Stefan Sperling wrote:
> On Wed, Jul 15, 2009 at 08:22:46AM -0500, Peter Samuelson wrote:
>> [Stefan Küng]
>>> $ 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.
>
> I'm not sure if this was a deliberate design decision, or simply an
> oversight in the implementation of svn diff. svn diff compares the
> text base with the working file. In case of a copied file, the copied
> file will have no changes WRT its text base, since the text base
> and the working file are identical.
It was deliberate. But, for obvious reasons, most of us have a love/hate
relationship with that decision. There are appropriate times for both
flavors of output here.
--
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2371490
Received on 2009-07-15 16:29:12 CEST