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

Re: diff handles addition on line end funny sometimes

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Mon, 18 May 2009 18:18:24 +0200

David Balažic wrote:
> Stefan Küng wrote:
>>> I understand that if every second character changes, then it
>>> is considered removed/added, but in the case above it is clearly
>>> an addition of text at the end of otherwise unchanged line.
>> - virtual int Stop();
>> + virtual int Stop();///< fgrg g r g
>> *you* can recognize that there's something added at the end.
>> But not an
>> algorithm. Because it doesn't know that "virtual int Stop();" is the
>> important part of that line. Imagine the following change:
>> - word1 word2 word3word4
>> + word1 word2 word3word5 word6 word7 word8 word9
>> Would you consider this a small change? I wouldn't - even if
>> it's only a
>> change at the end.
> 1.) Recognizing that something is added at line end is actually trivial code.

The code is trivial, yes. But first define what "added at the line end"
means. For example,
- word
+ word word1 word2 word3 word4 word5 word6 word7
would that fall into that defintion?

What about
- .
+ .*(regextest?[a-Z])?

> 2.) Your example is different, because you removed the last word on the line.

Define "word" please :)


is "this" the word? Or "this."? If "this", then is "." a word itself?

TMerge doesn't know about words but only tokens. It doesn't understand
languages at all.

> Even so, I see no harm in coloring the new part as "new part" and the rest as
> "unchanged part of line".

There's an option in TMerge:
View->Inline diff word wise

try toggling that option - it toggles the definition of 'word'.


  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.net
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].

Received on 2009-05-18 18:18:44 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.