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

Forward blame (was "svn blame" with a specified revision)

From: Colin Watson <cjwatson_at_flatline.org.uk>
Date: 2003-10-24 10:58:11 CEST

On Tue, Oct 14, 2003 at 10:24:23AM -0400, mark benedetto king wrote:
> On Tue, Oct 14, 2003 at 12:16:49AM +0100, Julian Foad wrote:
> > The reason for (X < Y) being an error is that it would introduce a
> > confusion about which version of the file is to be annotated: FILE@X or
> > FILE@Y. It would be possible to write a forward-looking annotator which
> > says who was the next person to change each line of this old file, and, for
> > that, "-rX:Y" (X < Y) would be appropriate.
> What a wonderful tool! "Who deleted the check for NULL?".

I'd like to have such a tool, and it does seem to be reasonably easy to
implement, too. I deleted the check for X < Y (which, BTW, says
"preceed" when it should say "precede"), tweaked some of the rest of the
logic a bit, and it seemed to work.

I have a few questions about the details:

  * The "natural" implementation leads to all lines being displayed as
    "next changed" in the end revision unless they've been changed
    between start and end, just like normal blame displays all lines as
    last changed in the start revision unless they've been changed
    between start and end. It makes a lot less sense for forward
    annotation, though. What's the right solution?

    Really, you don't want to annotate a line with a revision unless the
    line was (a) actually changed in that revision and (b) in the range
    you're interested in. So how about we simply leave the revision and
    author columns blank unless the line has been changed in a revision
    Z where X<Z and Z<=Y?

  * Should it be simply -rX:Y with X < Y (actually, the current
    implementation seems to require -rY:X for this), or should there be
    an extra --forward option? It makes a difference when the question
    you want to ask is "who next changed this code after revision X",
    where the syntax would be either "-rX:HEAD" or "-rX --forward".

With decisions on these, I'll send a patch.


Colin Watson                                  [cjwatson@flatline.org.uk]
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Oct 24 10:58:52 2003

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.