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

Re: TortoiseMerge inline diff coloring issue

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Fri, 24 Apr 2015 19:44:03 +0200

On 24.04.2015 13:48, Tobias Kaes wrote:
>> On 22.04.2015 19:04, Tobias Kaes wrote:
>>> Hi, I've got some diff coloring issue with TMerge (updated to the latest version 1.8.11 and the issue persists)
>>>
>>> I've got two files where within a line two words have been swapped: "dead tree" has been changed to "tree dead" (sample files + screenshot attached)
>>>
>>> TMerge colors "tree" in the first line red and "dead" in the second line as yellow. Reading the red one as 'removed' and yellow as 'inserted' this does not make sense, as the result would have to be "dead dead" and not "tree dead".
>>
>> While not exactly what you would expect, it's actually correct.
>> TMerge and the underlying diffing engine does not recognize
>> swaps/exchanges but only adds and removes.
>
> That's what I was trying to say. When read as adds/removes the coloring is not correct.
>
>
>> What you see is that on the left side, the word "tree" is missing before
>> "dead", indicated by the red vertical line. Then the word "dead" is
>> unchanged, and after "dead" the word "tree" is being removed.
>> On the right side, the word "dead" is missing before "tree", and the
>> word "dead" is added after "tree".
>
> Your explanation only makes sense if the left hand side displays all edits of a diff *to* the original and the right hand side displays all edits of a diff *from* the original.
>
> But thats twice the edits, thats not how other diffs are displayed. Other displayed diffs normally expect you to take the edits from both sides (e.g. red removes on the left side and yellow inserts on the right side). Doing that here gives the wrong result ("dead dead")
>
> Two more observations to underline my point:
>
> (1) on the left side 'dead' is blue and on the right side 'tree' is blue. normally only unchanged text is blue, but the text is not the same so it isn't unchanged. It shouldn't be blue.
>
> (2) instead of swapping two adjacent words "dead tree" -> "tree dead" try putting a third word in the middle, for example "dead x tree" -> "tree x dead". The diff is what I would expect, you need to take all 4 edits into account to go from original to modified. The edits on one side won't do.
>
>
> Sorry for bothering you if I'm wrong, but maybe you can take another look.

I know it looks wrong, but actually it's correct.
But I'll see what I can do - maybe there's a way to keep the correct
diff but tweak the coloring so it doesn't look so wrong.

Stefan

-- 
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest interface to (Sub)version control
   /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3114416
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2015-04-25 02:49:06 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.