[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' - v5

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2005-05-12 13:32:31 CEST

On Thu, 12 May 2005 alexander@collab.net wrote:

> On Wed, 2005-05-11 at 16:42 +0200, Peter N. Lundblad wrote:
> Thanks Peter :-). I gone though r14690, got some questions and a
> bug to be fixed. Let start with the bugs first
>
Thanks for taking a look.

> Bug:-
> * Multiple targets on blame, if one of the target is either a
> directory or a un-revisioned file, we will get a incomplete xml output
> and blame terminates prematurely.
>
I don't think it is a bug to leave the XML incomplete if we exit with an
error. In general, you may not have enough information to complete the
output. A program using the cmdline client should check the return value,
and if it is non-zero it should assume that the operation didn't complete.

In what cases svn should continue on errors is another discussion. There
have been talk about inconsistentcies here, but it is not related to the
XML output patch per see.

> Questions:-
> * Any good reason why U deprecated print_blame_xml function and
> putting all tags in to callback function 'blame_receiver_xml' ?. I think
> print_blame_xml function give us much more structured code and also
> similar to traditional blame output code fragment.
>

I don't agree. All the old blame_receiver_xml was doing was converting
some arguments to strings and then it called print_blame_xml. There's no
point in creating an extra function for that.

> * Traditional output for blame on multiple targets now gives confusing
> result. Should this be fixed?. Discussion on this with Ben, Julian, ...
> could be found in http://svn.haxx.se/dev/archive-2005-04/1699.shtml
>
I've no strong opinion here. cat doesn't do it.

>
> > > * subversion/tests/clients/cmdline/blame_tests.py
> > > (blame_in_xml): New test for blame --xml
> > > (blame_on_unknown_revision): New test for blame output on
> > > unknown revision
> > I didn't find this last test, but it would be useful. Please submit a
> > separate patch if you have it somewhere.
> >
>
> I will write one, but could U explain 'unknown_revision' or tell me how
> to reproduction this. My understanding about it is very limited and what
> I know is, every thing that goes into subversion are versioned so how
> come UNKOWN-VERSION?
>
If you try
svn blame -r14000:HEAD
http://svn.collab.net/repos/svn/trunk/subversion/clients/cmdline/blame-cmd.c
you'll see what I mean. It will give you no info for lines last changed
before r14000.

So, you can create a file with a line and commit r1, add a line
and commit r2. Then blame -r2:2. You'll get no commit info for the line
added in r1.

BTW, even your basic test case caught a portability bug (see r14705).
Good! :-)

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 12 13:25:31 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.