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

Request for comments - 'svn log --xml' format

From: Nuutti Kotivuori <naked_at_iki.fi>
Date: 2002-10-30 13:10:41 CET

Benjamin Pflugmann wrote:
> On Tue 2002-10-29 at 15:51:38 -0600, Karl Fogel wrote:
>> Nuutti Kotivuori <naked@iki.fi> writes:
>>> So - I could go for dropping the --incremental option altogether
>>> and have the default output only have <logentry> items
>>> always. People can do their own wrapping if they want it as a
>>> well-formed document just as well. Would you consider this as a
>>> better choice?
>>
>> Yes -- in fact, how about that as the default behavior, with a new
>> option to cause the old behavior (that is, to wrap it in top-level
>> elements)? :-)
>
> I second that, if I may. ;-)
>
> I haven't done all that much with XML and wouldn't be sure what I
> have to add without some digging. I would really like the tool being
> able to print out a complete document on request.

Let's get first clear how the behaviour is right now.

First the output without incremental:

,----[ svn log -r 3575:3576 --xml http://svn.collab.net/repos/svn ]
| <?xml version="1.0" encoding="utf-8"?>
| <log>
| <logentry
| revision="3575">
| <author>dlr</author>
| <date>2002-10-30T07:39:59.619678Z</date>
| <msg>* fs.py, repos.py, wc.py, delta.py, util.py, client.py, __init__.py,
| ra.py, setup.py: Adjusted copyright for 2002. Because I can.
| </msg>
| </logentry>
| <logentry
| revision="3576">
| <author>cmpilato</author>
| <date>2002-10-30T08:54:38.678942Z</date>
| <msg>* gsvn/src/gsvn_wc.py
| (notify_fn): Make the debug output at least look intentional here.
| (WorkingCopy.commit, WorkingCopy.mkdir, WorkingCopy.delete): New functions.
| </msg>
| </logentry>
| </log>
`----

This is a well-formed XML document in itself - and even the encoding
is utf-8 for real.

Then the output with incremental:

,----[ svn log -r 3575:3576 --xml --incremental http://svn.collab.net/repos/svn ]
| <logentry
| revision="3575">
| <author>dlr</author>
| <date>2002-10-30T07:39:59.619678Z</date>
| <msg>* fs.py, repos.py, wc.py, delta.py, util.py, client.py, __init__.py,
| ra.py, setup.py: Adjusted copyright for 2002. Because I can.
| </msg>
| </logentry>
| <logentry
| revision="3576">
| <author>cmpilato</author>
| <date>2002-10-30T08:54:38.678942Z</date>
| <msg>* gsvn/src/gsvn_wc.py
| (notify_fn): Make the debug output at least look intentional here.
| (WorkingCopy.commit, WorkingCopy.mkdir, WorkingCopy.delete): New functions.
| </msg>
| </logentry>
`----

There is no XML-declaration and there is no wrapping <log>
element. This is a standard XML-snippet that can be inserted inside a
document or used directly.

Now, firstly - if anyone has a suggestion how either of these output
forms should be changed, please mention it. That is, if you think it
would be better someway else. Also mention if you think either of the
forms is useless and only one output form should be defined.

Then, secondly - if anyone has comments on what commandline options
should be used to get these forms.

I agree with Karl - I think the "incremental" form should be the
default and the full-form document should be behind an option, if it
exists at all. But on the other hand - these operations are almost
always executed from a script and I doubt it really matters that much
which one of the options is the default - or even that the
'--incremental' option name is somewhat confusing.

But, give me comments - especially the few people who have actually
used the --xml option somewhere.

-- Naked

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 30 13:12:04 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.