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

[PATCH] Easier to read multi-line properties in proplist and propget

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Thu, 14 Aug 2008 13:59:32 +0100

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-08-14 14:59:58 CEST

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.