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

"svn diff -c" behavior on file copy from an old revision

From: Vincent Lefevre <vincent-svn_at_vinc17.net>
Date: Mon, 18 Nov 2019 10:44:04 +0100

I have the following issue with svn 1.10.6:

Assume that I committed "file1" at revision 1, did some unrelated
change at revision 2, and for revision 3, copied "file1_at_1" to "file2"
with "svn copy"[*] and did some changes in file2 before the commit.

[*] The revision older than the latest one is what happens when one
does a "svn copy" directly from the working copy without an update
first.

If I do "svn diff -r 1:3 file2", then I get the changes that have been
introduced between file1 and file2. But if I do "svn diff -c 3 file2",
which is equivalent to "svn diff -r 2:3 file2", then I get the whole
file2 content, as if file2 were an entirely new file.

I'm wondering whether this is the expected behavior. In any case,
this behavior is rather unintuitive and rather useless. I think there
should be an easy way to get the changes introduced by a commit.

Note: "svn cat -r... file2" or "svn cat -r... file2_at_3" also shows a
similar behavior:
  -r1: one gets file1_at_1
  -r2: "Unable to find repository location for..." error
  -r3: one gets file2_at_3

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Received on 2019-11-18 10:44:24 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.