You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jonas Berlin <xk...@outerspace.dyndns.org> on 2005/03/17 13:49:59 UTC
Cosmetic bug: svn diff -rBASE:HEAD vs -rHEAD:BASE
-----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
RE: Cosmetic bug: svn diff -rBASE:HEAD vs -rHEAD:BASE
Posted by Dale Worley <dw...@pingtel.com>.
> From: Jonas Berlin [mailto:xkr47@outerspace.dyndns.org]
>
> 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
And even that is incorrect, as the headers should read:
> ===================================================================
> --- foo/somefile (revision 2)
> +++ foo/somefile (revision 1)
since the diff is against BASE, not the WC.
Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org