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

Cosmetic bug: svn diff -rBASE:HEAD vs -rHEAD:BASE

From: Jonas Berlin <xkr47_at_outerspace.dyndns.org>
Date: 2005-03-17 14:49:59 CET

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Let's say I have a repository with one file "somefile" that in revision 1
has only one line "hello" and in revision 2 also a second line "goodbye".

I check it out, getting revision 2:

$ svn co foo

Then I go back in time

$ svn up -r 1

and do

$ svn diff -rHEAD:BASE

I get:

Index: foo/somefile
===================================================================
- --- foo/somefile (revision 2)
+++ foo/somefile (working copy)
@@ -0,2 +0,1 @@
~ hello
- -goodbye

This is all fine. Then if I swap the revisions like this:

$ svn diff -rBASE:HEAD

I get:

Index: foo/somefile
===================================================================
- --- foo/somefile (revision 2)
+++ foo/somefile (working copy)
@@ -0,1 +0,2 @@
~ hello
+goodbye

The result is correct, except for a minor bug with the "---" and "+++"
lines. They have the revisions the wrong way around. They should be:

- --- foo/somefile (working copy)
+++ foo/somefile (revision 2)

This bug only seems to appear when I use BASE as the "old" revision together
with any revision that's newer than BASE, in this case at least HEAD and 2.

NOTE: the diffs presented here are hand-crafted and might have bugs :)
NOTE: I'm using svn, version 1.1.3 (r12730)

- --
- - xkr47
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCOYsFxyF48ZTvn+4RArSUAJ4uPHrzhamPL+iB8r+/OZKbzVkkqgCgmpBk
mUewxq/8VhtXbC3jpvaPWFU=
=xJDV
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Mar 21 15:20:29 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.