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

Re: [PATCH] 'svn blame --xml' - v2

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2005-05-04 10:11:14 CEST

On Wed, 4 May 2005, [utf-8] Ã^Xyvind A. Holm wrote:

> On 2005-05-04 08:24:09 Peter N. Lundblad wrote:
> > On Wed, 4 May 2005, [utf-8] ?^Xyvind A. Holm wrote:
> > > On 2005-05-02 05:09:09 alexander@collab.net wrote:
> > > > Version: 2, Patch to add XML output for 'svn blame'
> > > [...]
> > > - And the actual text line with it's own element from the file is
> > > missing in the XML.
> >
> > That's deliberate (see the feedback to the first version of the
> > patch). In short, we don't know the encodig of the file content, so we
> > can't include it in XML (which has to be UTF8, or some or some other
> > encoding, but it has to be consistent.) It is easy to get at the
> > content with svn cat.
>
> Yes, that's a good reason not to include the actual line text. But what
> about including the actual line number instead? XML suggestion:
>
With an entry element for each line, I don't see a point in showing that
the computer can count:-) Remember that this isn't for humans.

> <?xml version="1.0" encoding="utf-8"?>
> <blame>
> <target
> path=".bashrc">
> <entry
> revision="32">
> <author>sunny</author>
> <date>1999-07-02T16:36:59.000000Z</date>
> <line>1</line>
> </entry>
> <entry
> revision="3245">
> <author>sunny</author>
> <date>2005-02-09T02:34:58.425406Z</date>
> <line>2</line>
> </entry>
> ...
> </blame>
>
> - <time> is changed to <date> (svn log --xml uses <date>)
+1.

> - A line number element is inserted in a <line></line> element. Which
> also could be called <linenum> for readability.

Not necessary.

> - Indent of the attributes is changed from three to two spaces.
>
We have standard functions to generate XML. I think it's fine to use
whatever format these already use. Whitespace is just whitespace.

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 4 10:04:11 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.