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

RE: Re: rfc: proposal for new "svn diff" behavior

From: Bill Tutt <rassilon_at_lyra.org>
Date: 2002-03-29 20:16:45 CET

> From: Karl Fogel [mailto:kfogel@newton.ch.collab.net]
[...]
> Maybe
>
> $ svn diff -r -:1598
>
> or something? I know it seems faintly silly to have a shortcut for
> subtracting 1, but having a small, predictable number of keystrokes
> every time can be a great help.
>

Do you really want the negative number to be 1? Don't you want the
repository revision number you're comparing against to be the last
repository revision that had a change for this directory?

That is, the negative number would be in terms of real ChangeSet
applications to the directory, and not how many repository revisions had
past. (Most of which might not have bothered to change this directory.)

Assuming that all of the above is true then how about this:

        $ svn diff -r -N:1598 TARGET

TARGET: Target of the diff in the repository. E.g.
/trunk/subversion/include

In order to find the starting point for the diff you do the following:
* Fetch the NodeChange at repository revision 1598 for TARGET.
* Walk backward in TARGET's ancestry by N steps. Call the reached
NodeChange SRC.
* Load SRC
* Perform the diff, ensuring to print out the repository revision that
the contents for SRC came from.

Now you have what you want. The nice thing here is that it works nicely
with directories and with files. If you just subtract N from the
repository revision specified that doesn't tell you jack about anything.
You might end up with an empty diff.

Thoughts?
Bill
 
Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 29 20:17:23 2002

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.