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