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

svn diff -r BASE:HEAD upside down in diff titles?

From: Bob Proulx <bob_at_proulx.com>
Date: 2005-09-06 02:02:21 CEST

Are the diff titles upside down when using BASE:HEAD?

I created a test repository and added a two line file to it for this
test. The file is just to have something semi-interesting in it.
This was actually found by one of the guys I work with in a larger
project context.

On a sample here I get:

  svn diff -r BASE:HEAD
  Index: testfile
  ===================================================================
  --- testfile (revision 0)
  +++ testfile (working copy)
  @@ -0,0 +1,2 @@
  +#!/usr/bin/env ruby
  +# A ruby script.

I believe the working copy is tagged to the wrong side of the diff.
The diff content data seems correct in both cases. But the revisions
listed in the parens seem to be reversed. Shouldn't that be the
following? (BASE is 1 and HEAD is 2.)

  svn diff -r BASE:HEAD
  Index: testfile
  ===================================================================
  --- testfile (working copy)
  +++ testfile (revision 2)
  @@ -0,0 +1,2 @@
  +#!/usr/bin/env ruby
  +# A ruby script.

Then try it the other way around. This looks okay.

  svn diff -r HEAD:BASE
  Index: testfile
  ===================================================================
  --- testfile (revision 2)
  +++ testfile (working copy)
  @@ -1,2 +0,0 @@
  -#!/usr/bin/env ruby
  -# A ruby script.

The titles there are matched appropriately.

Then try the same test with numbers.

  svn diff -r 1:2
  Index: testfile
  ===================================================================
  --- testfile (revision 0)
  +++ testfile (revision 2)
  @@ -0,0 +1,2 @@
  +#!/usr/bin/env ruby
  +# A ruby script.

And the other way around.

  svn diff -r 2:1
  Index: testfile
  ===================================================================
  --- testfile (revision 2)
  +++ testfile (revision 1)
  @@ -1,2 +0,0 @@
  -#!/usr/bin/env ruby
  -# A ruby script.

Those both seem "correct". Shouldn't the numbers behave exactly the
same as the ones using BASE and HEAD?

I looked through the existing issues and could not find this listed
there. Am I misunderstanding this case?

Actually I think I would prefer if the parens always listed the
revision numbers and never listed "working copy". Although I don't
feel strongly and it does not really matter. I just think that always
listing things the same way is cleaner and more consistent and so I
would prefer to always see the "revision #" there.

Thanks
Bob

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Sep 6 02:03:57 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.