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

multiple targets for 'svnlook propget'

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Fri, 16 Nov 2012 10:45:52 +0100

Right now, 'svnlook propget' supports only a single PATH_IN_REPOS argument:

    usage: 1. svnlook propget REPOS_PATH PROPNAME PATH_IN_REPOS

I think it would be useful to support multiple targets, like 'svn
propget'. That would make it much faster to gather all props set
during a transaction, for instance in a pre-commit hook:

    svnlook propget -t $TXN $REPOS svn:eol-style `svnlook changed -t

The only complication I see, is that the output for multiple targets
has to write the node for which the properties are shown.

Looking at 'svn propget' for inspiration, we see that it doesn't
output the node when there is only one target. But it does when there
are multiple targets. I guess 'svnlook propget' could implement the
same behavior, which means that the output for single target remains
backwards compatible (at the cost of slight increase of complexity for
scripts that parse that output -> they have to know if they passed one
or mutiple targets).

Current output of 'svn propget':

    $ svn pg svn:eol-style ^/file.txt
    $ svn pg svn:eol-style ^/file.txt ^/binary.exe ^/file2.txt
    http://my.svn.server/svn/file.txt - native
    http://my.svn.server/svn/file2.txt - native

(As you can see, the it simply does not output the targets that don't
have the property, and shows the actual target for every file that

Or with working copy targets:

    $ svn pg svn:eol-style file.txt binary.exe file2.txt
    file.txt - native
    file2.txt - native

Now, when we look at the output of 'svnlook propget':

    $ svnlook pg repos svn:eol-style file.txt

We could have following multi-target output:

    $ svnlook pg repos svn:eol-style file.txt binary.exe file2.txt
    file.txt - native
    file2.txt - native


P.S.: This multi-target output isn't very parseable for multi-line
properties. Currently, 'svn propget' also has this problem, but users
can use --xml to get machine-readable output. Maybe 'svnlook propget'
should eventually also grow a --xml option to handle this. But I'd say
that's yet another feature. For now, I would be happy if svnlook could
already do "plain" output for multiple targets, which can already be
useful/parseable for single-line properties like svn:eol-style.

Received on 2012-11-16 10:46:49 CET

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