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

'svn propget -R' output difficult to parse

From: Colin Watson <cjwatson_at_flatline.org.uk>
Date: 2002-10-08 14:53:28 CEST

Hi,

I'm trying to build myself some kind of permissions support with
properties that I can use until proper support is available. While doing
so, I ran into the problem that the output of 'svn propget -R' can be
difficult to parse. Here's an example:

  [cjwatson@arborlon ~]$ svn ps cjwatson:unix-perms 700 .hide
  property `cjwatson:unix-perms' set on '.hide'
  [cjwatson@arborlon ~]$ svn pg -R cjwatson:unix-perms
  700
  [cjwatson@arborlon ~]$ svn ps cjwatson:unix-perms 600 .muttrc
  property `cjwatson:unix-perms' set on '.muttrc'
  [cjwatson@arborlon ~]$ svn pg -R cjwatson:unix-perms
  ./.hide - 700
  ./.muttrc - 600
  [cjwatson@arborlon ~]$ svn revert .muttrc
  Reverted .muttrc
  [cjwatson@arborlon ~]$ svn pg -R cjwatson:unix-perms .
  700
  [cjwatson@arborlon ~]$ svn pg -R cjwatson:unix-perms . .
  ./.hide - 700
  ./.hide - 700

The -R flag alone isn't enough to trigger filenames being printed, which
makes the output useless - I can't tell from the value of the property
in the output of the second command above what filename it refers to. I
think that filenames should always be printed when -R is used.

Here's what seems to be a workable patch against 3327:

Index: subversion/clients/cmdline/propget-cmd.c
===================================================================
--- subversion/clients/cmdline/propget-cmd.c
+++ subversion/clients/cmdline/propget-cmd.c 2002-10-08 05:02:32.000000000 +0100
@@ -117,7 +117,8 @@
           SVN_ERR (svn_client_propget (&props, pname_utf8, target,
                                        opt_state->recursive, pool));
           
- print_filenames = (targets->nelts > 1 || apr_hash_count (props) > 1);
+ print_filenames = (opt_state->recursive || targets->nelts > 1
+ || apr_hash_count (props) > 1);
           
           for (hi = apr_hash_first (pool, props); hi; hi = apr_hash_next (hi))
             {

Is this sane, and if so should I file a bug? I scanned through recent
list archives and bug reports and couldn't see anything relevant.

Thanks,

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 8 14:59:28 2002

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.