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

Re: Odd "diff" behavior

From: Augie Fackler <durin42_at_gmail.com>
Date: Sun, 23 Mar 2008 18:53:21 -0500

On Mar 23, 2008, at 6:08 PM, Karl Heinz Marbaise wrote:

> Hi,
>
>> $ svn merge -r29788:29789 http://svn.collab.net/repos/svn/trunk
>> --- Merging r29789 into '.':
>> A notes/wc-2.0-design
>> $ svn st [03/23/08 4:47PM]
>> M .
>> A + notes/wc-2.0-design
>> $ svn diff
>>
>> Property changes on: .
>> ___________________________________________________________________
>> Modified: svn:mergeinfo
>> Merged /trunk:r29789
>
>
>> If I did a normal add of the file,
> This is exactly what you didn't have done.
> The file has been added on the branch (or in this case on the trunk).
> This is indicated by the "+" sign after "A" and merged it into the
> working copy.

I understand that - my point is the behavior is different for normal
adds vs add-with-history.

>
>
>> it would show up in the diff.
> I would say no, cause the file in this particular case has an ancestry
> (comming from the trunk; merged or in other words copied) in this
> particular case.
>
> You will get the same result if you only copy a file in the WC (svn cp
> file3.txt fileC.txt; Diff will print out nothing,
> but svn status will print out:
> A + fileC.txt
>
> So this means there is no difference between the copied file and the
> original. And a merged file is (not really) more than a copied file.

See below.

>
>
>> Is my expectation of seeing the added file in the
>> diff wrong?
> My first thought was i expected it too...but i tested it with SVN
> 1.4.2
> and get exactly the same result....and then i thought a little bit
> about
> and came to the result i would say yes you are wrong...

I know the results are the same in 1.4.x (and presumably earlier), but
the thing that frustrates me about this is that the diff gives
absolutely no indication there is anything changed given a file added
with history, which seems wrong to me. My personal interpretation of
the diff command was always "what is different as compared to the last-
updated-rev of the wc?" which isn't what it actually does - I'm
raising a UI question, not actually saying it's wrong. Does anyone
else see the expected behavior I do, or am I the odd case out? It
doesn't feel "right" to be doing the diff of a copied file against the
copy source, but instead against the path.

Thanks,
Augie

>
>
> Kind regards
> Karl Heinz Marbaise
> --
> SoftwareEntwicklung Beratung Schulung Tel.: +49 (0) 2405 / 415 893
> Dipl.Ing.(FH) Karl Heinz Marbaise ICQ#: 135949029
> Hauptstrasse 177 USt.IdNr: DE191347579
> 52146 Würselen http://www.soebes.de

  • application/pkcs7-signature attachment: smime.p7s
Received on 2008-03-24 01:00:15 CET

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