Login | Register
My pages Projects Community openCollabNet

Discussions > dev [DISABLED] > Diff does not work on a copied file

Discussion topic

Back to topic list

Diff does not work on a copied file

Author msshu
Full name Alexander Sinyushkin
Date 2009-01-07 09:26:00 PST
Message Hello community,

Today I have discussed this problem with Julian Foad and Mike Pilato on
the irc channel, below you can find the history of the discussion to get
the idea about the problem itself:

[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
which was copied from another one

[15:49] <MsShu> julianf: *one

[15:49] <MsShu> julianf: if, let's say, there's a file /sdf in a
repository and we made a copy of it called /sdfCopy in revision 21

[15:50] <MsShu> julianf: then I try to diff it in the following way:
'svn diff -r21:20 file:///../sdfCopy@21'

[15:50] <MsShu> julianf: I get an error here

[15:51] <MsShu> julianf: though if I provide the right-hand revision as
one in which /sdf was really changed, it works!

[15:51] <julianf> MsShu: what do you mean by "really changed"? Can you
give the equivalent recipe?

[15:52] <MsShu> julianf: on the other hand, if I just diff the parent
dir where both sdf and sdfCopy live, it also works with the revision
range -r21:20

[15:52] <MsShu> julianf: I just meant that diff do not work in those
cases when the right-hand revision is a revision where /sdf was not ever

[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
revisions 17, 18, then in revisions 19 and 20 it was not changed

[15:54] <MsShu> julianf: in revision 21 the copy was performed

[15:55] <MsShu> julianf: so, whenever I specify 'svn diff -r21:[17, 18]
file:///path/to/sdfCopy', the command works

[15:55] <julianf> MsShu: Oh, I see what you mean now.

[15:55] <MsShu> julianf: but if I specify 'svn diff -r21:[19, 20]
file:///path/to/sdfCopy', it says

[15:55] <MsShu> svn: The location for
'file:///home/alex/w​orkspace/tmp/example​Repository/sdfCopy' for revision
19 does not exist in the repository or refers to an unrelated object

[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
one of those revisions?

[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
this bug (e.g. for Unix or Windows shell or in Python)? It would be very
helpful if you can.

[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
can file an issue for it.

[16:42] <MsShu> julianf: ok

[16:43] <julianf> If you can write it as a Python test case in
subversion/tests/cmd​line/diff_tests.py, that would be best, otherwise a
shell script is fine.

[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
r19, then the error you see is expected behaviour.

[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!

« Previous message in topic | 1 of 4 | Next message in topic »


Show all messages in topic

Diff does not work on a copied file msshu Alexander Sinyushkin 2009-01-07 09:26:00 PST
     Re: Diff does not work on a copied file julianfoad Julian Foad 2009-01-08 08:19:50 PST
         Re: Diff does not work on a copied file cmpilato C. Michael Pilato 2009-01-08 08:28:55 PST
         Re: Diff does not work on a copied file msshu Alexander Sinyushkin 2009-01-09 02:50:08 PST
Messages per page: