[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: Leslie Kishalmi <lkishalmi_at_netbeans.org>
Date: 2005-01-14 21:07:27 CET

kfogel@collab.net wrote:
> Julian Foad <julianfoad@btopenworld.com> writes:
>
>>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"/>
>><listentry
>> name="eol-test"
>> committed-date="2003-09-29T22:23:23.939789Z"
>> last-author="julianfoad"
>> kind="file"
>> size="7"
>> revision="35"/>
>></list>
>
>
> Minor point: I think just "entry", not "listentry", would be fine.
>
>
>>The preference for using attributes rather than elements, and some of
>>the names, were inspired by the .svn/entries file - not that that
>>private format should unduly influence how we present public XML
>>output, but at least the use of attributes seems appropriate here.
>>The names are not necessarily the best choices or even quite correct -
>>I haven't yet checked whether "svn list" always presents the last
>>committed date rather than, say, the date of the working copy file.
>
>
> Can all the same things be represented in attributes that can be
> represented in CDATA inside an element? I keep learning the answer to
> this, and keep forgetting, sigh :-(. Anyway, if not, the use of
> attribute for (at least) filename was a mistake in .svn/entries, and
> first-class elements would probably be better.
+1 vote on first class element for filename. Something like this:
<entry
     committed-date="2003-09-29T22:23:23.939789Z"
     last-author="julianfoad"
     kind="file"
     size="7"
     revision="35">eol-test</entry>

And use CDATA as needed.

Laszlo Kishalmi

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jan 14 21:10:25 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.