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

Re: Parseable output: --xml option for more commands

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-01-16 20:46:11 CET

Julian Foad wrote:
> How about this format for "svn list --xml"?
> ~/src/subversion> svn list ~/tmp/sandbox/ --xml -r40 -v
> <list>
> <listentry
> name="d"
> committed-date="2003-09-22T21:38:51.707992Z"
> last-author="julianfoad"
> kind="dir"
> revision="29"/>

Here's my latest plan, incorporating comments that several of you made. It's
rather different.

~/tmp> svn list sandbox/ sandbox/sail/ --xml
<list path="sandbox">
   <entry kind="file">
     <commit revision="57">
   <entry kind="dir">
     <commit revision="51">
<list path="sandbox/sail">
   <entry kind="dir">
     <commit revision="52">

(Subversion doesn't indent the XML like this.)

* Attributes are used minimally; elements are preferred for flexibility.

+ The top-level element specifies which path is being listed, because a single
"svn list" command can list multiple paths and there is otherwise no way of
distinguishing them (except their sequential order).

+ The data about the last commit of this item are grouped together into a
<commit> element that is very similar to the format of "svn log --xml". (It
could have the same element type declaration.)

+ The file name is element content rather than an attribute. This
stylistically makes a bit of sense in that the name of each item is the primary
output from the "svn list" command.

If this seems OK I'll submit a patch for it.

- Julian

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jan 16 20:47:31 2005

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.