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

svn diff interface

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2002-05-07 04:35:53 CEST

I feel pretty bad for bringing this up so late, especially since Ben
just said he's tired of talking about it, but I think I'd feel worse
bringing it up after 1.0, or letting someone else notice it. I wasn't
really able to formulate this thought when Ben first proposed the
revised "svn diff" interface.

Basically, I think our "svn diff" interface is too limited if it
doesn't provide a way to diff the working directory against an
arbitrary URL, as currently seems to be the case.

For example, if I am merging changes between .../emacs-21 and
.../emacs-20 into .../emacs-locally-modified, I will likely want to
look at the diffs between /emacs-21 and the current working copy
before I commit, to make sure that the right set of local mods are
reflected by my merge results.

The current syntax only allows diffs between stuff which has already
been checked in.

I can see a few options here:

  1. Stick with what we have. Require people to go through
     contortions for the use case I mentioned.

  2. Phillip Martin's suggestion, where "svn diff" takes either one or
     two arguments (instead of N arguments or two arguments).

  3. Split "svn diff" into two commands, or require an explicit flag
     in one of the two use cases.

I don't like (1) because I feel like some day there will be enough
momentum to make developers want to correct the problem, and if we
don't fix it now we'll end up stuck with a user interface which
screams "historical." I don't like (2) because it's not very
consistent with CVS. I don't like (3) very much because I can't think
of a specific way to make it elegant, but it is probably the cleanest
answer overall.

The fundamental problem is that "cvs diff" works very differently from
regular old "diff", and in Subversion we want to be able to support
both usages. The "cvs diff" usage makes sense for comparisons on a
single branch, while the "diff" usage makes sense for comparisons
between branches. It isn't always possible to determine by looking at
the arguments alone which usage is desired.

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