subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Neyman <>
Subject Show textual diff in a moved/copied file - how?
Date Mon, 26 Feb 2018 07:38:03 GMT
Hi all,

I am trying to dig for some changes in a file that was moved a few times 
and 'svn diff' shows full "remove old location and add new location as 
if it were a new file" diffs, which are not helpful. Is there a way to 
make the diff show the changes as compared against the origin of the 
copy? I tried --notice-ancestry, does not help.

I have a vague recollection that 'svn diff' used to show the changes in 
such copied files before - but I tried the small reproduction script 
below and it shows the same, both with 1.7.22/1.8.17/1.9.7/trunk:


rm -rf /tmp/foo-{svn,wc}
svnadmin create /tmp/foo-svn
svn co file:///tmp/foo-svn foo-wc
cd foo-wc
echo foo > foobar
svn add foobar
svn ci -m "1"
svn mv foobar barfoo
echo bar >> barfoo
svn ci -m "2"
svn up
svn diff -c 2
svn --version

Diff output:

Index: foobar
--- foobar    (revision 1)
+++ foobar    (nonexistent)
@@ -1 +0,0 @@
Index: barfoo
--- barfoo    (nonexistent)
+++ barfoo    (revision 2)
@@ -0,0 +1,2 @@


View raw message