You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2008/08/14 12:59:32 UTC
[PATCH] Easier to read multi-line properties in proplist and
propget
This patch changes the output format of "svn proplist --verbose" so as
to put each property value on a separate line from the property name,
and also to indent the property value consistently even if it is a
multi-line value.
I think this makes the output easier to read.
Old:
[[[
> $ svn proplist -R --verbose www
> Properties on 'www':
> svn:ignore : downloads
> tarballs
> branding
> xhtml1.tgz
> xhtml1-20020801
> xhtml1.catalog
>
> Properties on 'www/mailing-lists.html':
> svn:mime-type : text/html
> svn:eol-style : native
> Properties on 'www/release-history.html':
> svn:mime-type : text/html
> svn:eol-style : native
> Properties on 'www/development.html':
> svn:mime-type : text/html
> svn:mergeinfo : /branches/bdb-reverse-deltas/www/development.html:31976-32455
> /branches/issue-3000/www/development.html:31642-31645,31647-31652,31654,31660
> /branches/issue-3220-dev/www/development.html:32136-32152
> /branches/svnpatch-diff/www/development.html:31831,31912
> svn:eol-style : native
> Properties on 'www/commercial-support.html':
> svn:mime-type : text/html
> svn:eol-style : native
]]]
New:
[[[
> $ svn proplist -R --verbose www
> Properties on 'www':
> svn:ignore
> downloads
> tarballs
> branding
> xhtml1.tgz
> xhtml1-20020801
> xhtml1.catalog
>
> Properties on 'www/mailing-lists.html':
> svn:mime-type
> text/html
> svn:eol-style
> native
> Properties on 'www/release-history.html':
> svn:mime-type
> text/html
> svn:eol-style
> native
> Properties on 'www/development.html':
> svn:mime-type
> text/html
> svn:mergeinfo
> /branches/bdb-reverse-deltas/www/development.html:31976-32455
> /branches/issue-3000/www/development.html:31642-31645,31647-31652,31654,31660
> /branches/issue-3220-dev/www/development.html:32136-32152
> /branches/svnpatch-diff/www/development.html:31831,31912
> svn:eol-style
> native
> Properties on 'www/commercial-support.html':
> svn:mime-type
> text/html
> svn:eol-style
> native
]]]
It also makes the output much more machine-parsable. A property name
cannot start with a space, so every line starting with 2 spaces and then
a non-space is a property name, and every line starting with 4 spaces is
part of the property value. (The parser can still tell whether the
property value ends with a newline or not.)
The patch also adds the "--verbose" option to "propget" and produces
output just like "proplist" when it is given.
New code, showing old (without --verbose) and new (--verbose) formats:
[[[
> $ bin/svn propget svn:ignore www
> downloads
> tarballs
> branding
> xhtml1.tgz
> xhtml1-20020801
> xhtml1.catalog
>
> $ bin/svn propget svn:ignore www subversion
> www - downloads
> tarballs
> branding
> xhtml1.tgz
> xhtml1-20020801
> xhtml1.catalog
>
> subversion - TAGS
> svn_private_config.h
> svn_private_config.h.in
>
> $ bin/svn propget --verbose svn:ignore www
> Properties on 'www':
> svn:ignore
> downloads
> tarballs
> branding
> xhtml1.tgz
> xhtml1-20020801
> xhtml1.catalog
>
> $ bin/svn propget --verbose svn:ignore www subversion/
> Properties on 'www':
> svn:ignore
> downloads
> tarballs
> branding
> xhtml1.tgz
> xhtml1-20020801
> xhtml1.catalog
>
> Properties on 'subversion':
> svn:ignore
> TAGS
> svn_private_config.h
> svn_private_config.h.in
>
]]]
I would like to know people's views on whether either or both of these
changes are a good idea, backward compatibility concerns, whether these
changes should be optional (like with "propget --verbose") or the
default, etc.
- Julian
Re: [PATCH] Easier to read multi-line properties in proplist and
propget
Posted by "C. Michael Pilato" <cm...@collab.net>.
Julian Foad wrote:
> On Thu, 2008-08-14 at 10:21 -0400, C. Michael Pilato wrote:
>> (Actually, come to think of it, --strict *should* today raise an error if
>> used with more than one target, but it doesn't. It just concatenates the
>> multiple property values in the output stream.)
>
> Yes, I've always thought that was almost useless. I'm not touching it
> here though.
I'll plug that hole myself right now.
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Re: [PATCH] Easier to read multi-line properties in proplist and
propget
Posted by Julian Foad <ju...@btopenworld.com>.
On Thu, 2008-08-14 at 10:21 -0400, C. Michael Pilato wrote:
> Ivan Zhakov wrote:
> > 2008/8/14 Julian Foad <ju...@btopenworld.com>:
> >> I would like to know people's views on whether either or both of these
> >> changes are a good idea, backward compatibility concerns, whether these
> >> changes should be optional (like with "propget --verbose") or the
> >> default, etc.
> >>
> > I like new format and --verbose option for proplist.
>
> (You mean 'propget' -- proplist already has a --verbose option.)
>
> Julian, does your proposal/patch continue to handle the --strict option to
> propget correctly? --strict causes byte-for-byte spewing of the property
> values, without associated filenames, character transcoding, etc.
Yes, it does. It doesn't allow --verbose to be specified in conjunction
with --strict (nor with --xml nor with --revprop).
> (Actually, come to think of it, --strict *should* today raise an error if
> used with more than one target, but it doesn't. It just concatenates the
> multiple property values in the output stream.)
Yes, I've always thought that was almost useless. I'm not touching it
here though.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Easier to read multi-line properties in proplist and
propget
Posted by "C. Michael Pilato" <cm...@collab.net>.
Ivan Zhakov wrote:
> 2008/8/14 Julian Foad <ju...@btopenworld.com>:
>> I would like to know people's views on whether either or both of these
>> changes are a good idea, backward compatibility concerns, whether these
>> changes should be optional (like with "propget --verbose") or the
>> default, etc.
>>
> I like new format and --verbose option for proplist.
(You mean 'propget' -- proplist already has a --verbose option.)
Julian, does your proposal/patch continue to handle the --strict option to
propget correctly? --strict causes byte-for-byte spewing of the property
values, without associated filenames, character transcoding, etc.
(Actually, come to think of it, --strict *should* today raise an error if
used with more than one target, but it doesn't. It just concatenates the
multiple property values in the output stream.)
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Re: [PATCH] Easier to read multi-line properties in proplist and propget
Posted by Ivan Zhakov <ch...@gmail.com>.
2008/8/14 Julian Foad <ju...@btopenworld.com>:
> I would like to know people's views on whether either or both of these
> changes are a good idea, backward compatibility concerns, whether these
> changes should be optional (like with "propget --verbose") or the
> default, etc.
>
I like new format and --verbose option for proplist.
--
Ivan Zhakov
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Easier to read multi-line properties in proplist and
propget
Posted by Julian Foad <ju...@btopenworld.com>.
Committed revision 32484.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org