[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Continuing after error with propget

From: Andy Levy <andy.levy_at_gmail.com>
Date: Wed, 16 Apr 2008 20:59:39 -0400

On Wed, Apr 16, 2008 at 8:46 PM, Daniel Caldwell
<dcaldwel_at_danielcaldwell.com> wrote:
> I'm working on a small script that runs propget on directories in my working
> copy. It's pretty simple stuff like:
>
> svn propget MY_PROPERT *.*
>
> However, not all files will have that property, also some files will be
> there that aren't under revision control. As a result, I'll get about half
> the output:
>
> myfile.test - My prop
> myfile1.test - My prop
> myfile2.test - My prop
> myfile3.test - My prop
> svn: 'myfile4.test' is not under version control.
>
>
> Then it doesn't continue on to the other files. I'd need to get a complete
> listing and then parse out the errors afterward. Does anyone know how I can
> get it to continue? Thanks.

Your shell is expanding *.* before svn even sees it - svn is seeing:

svn propget MYPROP myfile.test myfile1.test myfile2.test myfile3.test
myfile4.test

You'll need to change your script to only pass the names of the files
in the directory which are versioned. Something like this *may* work
(not fully tested).

svn st --verbose --non-recursive <dirname>
Parse the output. Any line not starting with a ? should indicate a
file which is versioned
For each filename found by the above, svn propget MYPROP <filename>

If the script needs to descend into each directory, not look at only
the current directory, remove --non-recursive from the command line.

There's probably a more elegant way to do it but this jumped to mind
immediately.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-04-17 03:00:49 CEST

This is an archived mail posted to the Subversion Users mailing list.