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

Re: 1.6 vs. 1.8: strange behavior of 'svn diff -cN WC-FILE' if the file was created in rev N by copying

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Tue, 25 Jun 2013 23:17:07 +0200

On Tue, Jun 25, 2013 at 10:56 PM, Stefan Sperling <stsp_at_elego.de> wrote:
> On Tue, Jun 25, 2013 at 10:26:08PM +0200, Ben Reser wrote:
>> Back to your issue. Since Subversion can't represent the copy as part
>> of the diff it tries to do the interoperable thing which is to
>> represent the addition of a new file (from a copy) as an addition.
>
> That's not quite true in general. It's more like:
>
> 1) If the copyfrom source is part of the operative revision range of
> the diff command, show a modification against the copyfrom source.
> Unless --show-copies-as-adds was passed, because then we always
> show copied files as an addition.
>
> 2) If the copyfrom source is not part of the operative revision range,
> history of the file isn't traced back to that revision, so it appears
> as an addition.
>
> It could be argued that 2) is weird special case, and that it should
> behave like 1) (i.e. trace back to the copyfrom source anyway) and
> only show an addition with --show-copies-as-adds.
>
> Johan pointed out that svnlook diff seems to traverse to the copyfrom
> source even in case 2). If this is indeed the case, these commands are
> now behaving in contradictory ways :( However, I think it's too late
> to change either command now.

Not by default perhaps, but we could do it by adding the same option
to 'svn diff' that you need for 'svnlook diff' for this to work:

C:\>svnlook help diff
...
  --diff-copy-from : print differences against the copy source

--
Johan
Received on 2013-06-25 23:17:59 CEST

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.