Diff does not work on a copied file
From: Alexander Sinyushkin <Alexander.Sinyushkin_at_svnkit.com>
Date: Wed, 07 Jan 2009 18:25:40 +0100
Hello community,
Today I have discussed this problem with Julian Foad and Mike Pilato on
[15:36] <MsShu> hello
[15:47] <julianf> MsShu: hello!
[15:48] <MsShu> julianf: hi! I've got a question about diff behavior
[15:48] <MsShu> julianf: it deals with the case when on diffs a file
[15:49] <MsShu> julianf: *one
[15:49] <MsShu> julianf: if, let's say, there's a file /sdf in a
[15:50] <MsShu> julianf: then I try to diff it in the following way:
[15:50] <MsShu> julianf: I get an error here
[15:51] <MsShu> julianf: though if I provide the right-hand revision as
[15:51] <julianf> MsShu: what do you mean by "really changed"? Can you
[15:52] <MsShu> julianf: on the other hand, if I just diff the parent
[15:52] <MsShu> julianf: I just meant that diff do not work in those
[15:53] <MsShu> julianf: but if it was, it profuces an expected diff output
[15:53] <MsShu> julianf: in my test repository /sdf was changed in
[15:54] <MsShu> julianf: in revision 21 the copy was performed
[15:55] <MsShu> julianf: so, whenever I specify 'svn diff -r21:[17, 18]
[15:55] <julianf> MsShu: Oh, I see what you mean now.
[15:55] <MsShu> julianf: but if I specify 'svn diff -r21:[19, 20]
[15:55] <MsShu> svn: The location for
[15:55] <MsShu> julianf: it looks weird
[15:56] <MsShu> julianf: shouldn't it work properly in these cases as well?
[15:56] <julianf> Yes... That looks like a bug.
[15:57] <julianf> MsShu: what version of svn?
[15:57] <Bert> MsShu: Was the file replaced instead of just modified in
[15:58] <MsShu> julianf: I tried with a trunk version 34756
[15:58] <MsShu> Bert: let me see..
[15:59] <julianf> MsShu: Thanks, that's recent enough.
[16:00] <MsShu> Bert: no, sdf wah just modified in both 17 and 18
[16:00] <MsShu> Bert: *was
[16:41] <julianf> MsShu: are you able to write a reproduction script for
[16:41] <MsShu> julianf: sure, I can
[16:42] <MsShu> julianf: then I shall post it to the mailing-list
[16:42] <julianf> Great. Yes, please. Then we can debug it, or you or we
[16:42] <MsShu> julianf: ok
[16:43] <julianf> If you can write it as a Python test case in
[16:49] <cmpilato> MsShu: how was the copy made? from what revision?
[16:50] <cmpilato> if the copyfrom-revision of the copy was prior to
[16:51] <cmpilato> you will have created a "gap" in the history of the
[16:52] <MsShu> cmpilato: sdfCopy was copied from /sdf in rev21
[16:52] <MsShu> cmpilato: from rev 20
[16:54] <cmpilato> if you reverse the revision range, does it work?
[16:55] <cmpilato> svn diff -r20:21 ...
[16:56] <MsShu> cmpilato: no
Below you'll find bash script and python tests attached.
---- Alexander Sinyushkin, TMate Software, http://svnkit.com/ - Java [Sub]Versioning Library! ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1010170
#!/bin/bash
SVNDIR=/home/alex/workspace/svn_trunk_latest
SVN=${SVNDIR}/subversion/svn/svn
URL=file://`pwd`/repos
rm -rf repos wc wc2 import-me
${SVNADMIN} create repos
echo "### Making a Greek Tree for import..."
echo "### Done."
echo "### Check out:"
cd wc
echo "### Modify file iota"
echo "### Commit changes to iota"
echo "### Modify file A/mu"
echo "### Commit changes to iota"
echo "### Copy iota to iota2"
echo "### Modify new file iota2"
echo "### Commit copy"
cd ..
echo "### Diff iota2 between r4 and r2"
echo "### And now diff iota2 between r4 and r3:"
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.