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

Re: Diff does not work on a copied file

From: Alexander Sinyushkin <Alexander.Sinyushkin_at_svnkit.com>
Date: Fri, 09 Jan 2009 11:49:53 +0100

> $ svn diff -r3:4 iota2

Although if you run this command for the parent directory of iota2 (with
the same revision range 3:4) the fact that there's a gap in the history
of iota does not prevent the diff command from printing out a correct
difference. That was the thing that made me suspect there's a bug
somewhere in locations investigation.

----
Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!
Julian Foad wrote:
> Alexander Sinyushkin wrote:
> 
>> [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 
>> object.
>>
>> [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.
> 
> Thank you very much for the reproduction recipes.
> 
> 
> The problem is indeed related to that "gap in the history" thing. In
> your Python script, 'iota2_at_4' is copied from 'iota_at_2', not from
> 'iota_at_3'. An attempt to show change number 4 fails with "diff":
> 
> [[[
> $ svn log -v -c4 iota2
> ------------------------------------------------------------------------
> r4 | jrandom | 2009-01-08 16:09:30 +0000 (Thu, 08 Jan 2009) | 1 line
> Changed paths:
>    A /iota2 (from /iota:2)
> 
> modified mu
> ------------------------------------------------------------------------
> 
> $ svn diff -c4 iota2
> /home/julianfoad/src/subversion-red/subversion/libsvn_client/ra.c:702: (apr_err=195012)
> svn: Unable to find repository location for 'iota2' in revision 3
> 
> $ svn diff -r3:4 iota2
> /home/julianfoad/src/subversion-red/subversion/libsvn_client/ra.c:702: (apr_err=195012)
> svn: Unable to find repository location for 'iota2' in revision 3
> 
> $ svn diff -r2:4 iota2
> Index: iota
> ===================================================================
> --- iota        (.../iota)      (revision 2)
> +++ iota        (.../iota2)     (revision 4)
> @@ -1,2 +1,2 @@
>  This is the file 'iota'.
> -new text in iota
> \ No newline at end of file
> +new text in iotanew text in iota2
> \ No newline at end of file
> 
> ]]]
> 
> Now, maybe we should call this a bug in the interpretation of the "-c"
> specifier: after all, if "svn log" interprets "-c4" correctly as "the
> change that created r4", then why can't "diff" do so?
> 
> I don't know whether to call this a bug right now.
> 
> (The fact that a "gap" is created in the history is a part of how
> Subversion works: we are not likely to be able to change that.)
> 
> - Julian
> 
> 
> 
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1013532
Received on 2009-01-09 11:50:24 CET

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