On Mon, Feb 04, 2013 at 11:54:21AM -0800, Alexey Neyman wrote:
> On Thursday, January 31, 2013 09:08:20 am Stefan Sperling wrote:
> > BTW, I went over one of FreeBSD's svn wiki pages a while back, and added
> > answers to open questions on this page:
> > https://wiki.freebsd.org/SubversionMissing
> 
> Speaking of which:
> 
> Is there a reason why it is necessary to use "the svn diff --old ^/somebranch 
> --new ." instead of the intuitive "svn ^/somebranch ."?

Would "svn diff ^/somebranch ." be synopsis 1?

  svn diff -rN:M ^/somebranch@HEAD .@HEAD
(i.e. svn diff -rN:M ^/somebranch@HEAD; svn diff -rN:M .@HEAD;
show the differences between rN to rM for ^/somebranch@HEAD and then show
the differences between rN and rM for .@HEAD -- where N defaults to
BASE if the target is a working copy path, and M defaults to HEAD)
Note that you can also specify 3 or more targets:

  svn diff -rN:M ^/somebranch@HEAD .@HEAD ^/someotherbranch@42 ...

Or would it be synopsis 2:

 svn diff --old ^/somebranch@HEAD --new .@HEAD
(i.e. show the difference between the two (path, revision) pairs
somebranch@HEAD and .@HEAD) ?

> It has bugged me for a while until I discovered this --old/--new trick.

I agree that --old --new syntax isn't intuitive at all.
But I believe it exists to resolve the above ambiguity.

The only remedy that comes to my mind is to introduce a new subcommand:
  svn compare TARGET1 TARGET2
which would equal
  svn diff --old TARGET1 TARGET2
I'm not sure if the community would like to see yet another new
subcommand though :)

Reply via email to