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

Re: creating patch of moved file fails

From: Peter Samuelson <peter_at_p12n.org>
Date: Wed, 15 Jul 2009 08:22:46 -0500

[Stefan Kng]
> $ svn mv testwc\file.txt testwc\file2.txt
> $ svn diff testwc > patch.txt
> now patch.txt only contains the deletion of file.txt, but not the add
> of file2.txt.

That is how 'diff' has always worked, isn't it? I believe the reason
is that it is more useful to show the diff of the file contents, rather
than just depicting the whole new file. Of course this means if you
did not edit the file after the 'svn cp' or 'svn mv', there will be
nothing in the diff.

There is also a --no-diff-deleted to make the 'svn mv' case more symmetric.

Peter Samuelson | org-tld!p12n!peter | http://p12n.org/
Received on 2009-07-15 15:23:10 CEST

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