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

Re: Format of svn command output

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2005-03-04 14:10:36 CET

On Wed, 2 Mar 2005, Steve Greenland wrote:

> On Wed, Mar 02, 2005 at 04:30:01PM -0500, Brad O'Hearne wrote:
> > Is there a way to get the output of svn commands returned as xml, or in
> > some other structured format, and if so, is there some doc that defines
> > the structure returned?
>
> I think the output of all the commands is in a "structured format".
> That is, some effort has gone into making the output parseable, and the
> structure is not modified lightly.
>
But it will happen. For example, the locking branch has changed the output
of svn update to add an extra column indicating that a lock was broken.

The problem with the current output is that it isn't easy to extend
without breaking scripts. Still, we sometimes need to extend it for enw
functionality.

> IMO, this is the right thing to do. The current output is both readable
> and easily handled by standard Unixy tools, like awk, grep, etc., which
> XML is not. If you're going to process XML, then you're writing a real
> program, and you might as well use the API rather than the command line
> tools. Or, write a filter that converts the current output to XML :-)
>
Or you could go the other way round, writing a filter that reads the XML
and outputs what you actually need. That could be done with XSLT, for
example, so it doesn't need to be a "real program".

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Mar 4 14:10:35 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.