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

svn diff on added file, foo does not exist in rN?

From: Martin Hauner <Martin.Hauner_at_gmx.net>
Date: 2007-12-11 09:46:05 CET

Hi,

from a svn client or user perspective diff behaviour on added files is surprising.

If i run the diff on two normal revisions of a file i get a patch file.

svn diff -r8:9 http://subcommander.tigris.org/svn/subcommander/trunk/CHANGES
Index: CHANGES
===================================================================
--- CHANGES (Revision 8)
+++ CHANGES (Revision 9)
@@ -16,6 +16,6 @@
...

If i run the diff at the revision where the file was added it does complain about the file missing in the previous revision. That's true because it was added at rev 4.

svn diff -r3:4 http://subcommander.tigris.org/svn/subcommander/trunk/CHANGES
CHANGES does not exist in revision 3 error.

But i wonder why svn diff doesn't provide an "add" patch. Can't it check that the file was added in r4 and then provide a diff against an empty file? IMHO that would be much more user friendly.

Where would i have to look in the diff code to create a patch, assuming that such a patch would be accepted?

-- 
Martin
Subcommander 2.0.0 Beta 1, 1.2.2, http://subcommander.tigris.org
a cross platform Win32/Unix/MacOSX subversion gui client & diff/merge tool.
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 11 09:46:18 2007

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