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

Re: bad output format design issue: svn log -v format is not parseable :-(

From: C.A.T.Magic <c.a.t.magic_at_gmx.at>
Date: 2004-04-05 03:18:49 CEST

>>> C.A.T.Magic wrote:
>>> | how can I tell, by looking at the output
>>> | A \branches\release-0.28.0 (from \trunk:6846)
>>> | if this means the filename
>>> | "\branches\release-0.28.0 (from \trunk:6846)"
>>> | or the file
>>> | "\branches\release-0.28.0"
>>> | ???

>> Edmund Horner wrote:
>> What about "svn log --xml" ? Hopefully it should output something that
>> is unambiguously machine readable (though requiring an XML parser, of
>> course).

> C.A.T.Magic wrote:
> as far as i can see it the XML output has similar issues:
> space characters are not escaped and the filenames are
> not defined as string attributes but just as plaintext
> between tags.
> afaik, most XML parsers collapse multiple spaces into a
> single space.
>
> when i look at the xml with an xml-viewer the SVN output
> <path
> action="A">/trunk/ a file with 2 spaces</path>
> </paths>
> displays as
> <path action="A">/trunk/ a file with 2 spaces</path>
>
> but i also tried it with the ruby-xml parser
> and the parsed string was correct
> ( "/trunk/ a file with 2 spaces" )
>
> i'm not sure what the xml standard defines
> for multiple spaces in this case or how other xml
> parsers handle this.
>
> i noticed that other characters are escaped,
> for example semicolons ';' are handled,
> umlauts 'ö' remain as utf-8.
> <path
> action="A">/trunk/a&amp;b-ö;2 3.txt</path>
> </paths>
>
>
> but even IF i could use --xml for svn log,
> there are several other commands
> which fail in the same way:
> svn status -v
> 8 8 cat release-0.28.0 (from trunk6846)
> 11 11 cat a file with spaces
> 10 10 cat a&b-ö;2 3.txt
> 12 12 administrator johnMyFile.c
> 12 12 administrator johnMy spaced File.c
> ---
> and these commands cannot output xml.
>
> ======
> c.a.t.

I consider these a P2 issue, because they really prevent me from
creating scripts that rely on the svn output.
how should I file this issue?
two or three issues, one for each svn function, one for xml,
or one issue just including this mail...?

I quick-fixed our svn commandline version to output a TAB after
filenames and after usernames, but I'd like to know if this
is the way to go for the svn team as well, or if I have to
merge that patch in every time I update svn... ?

thanks,
======
c.a.t.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 5 03:18:59 2004

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.