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

Patch: New test for when to show inline diffs

From: Morten Kloster <finger6_at_yahoo.com>
Date: Sat, 14 May 2011 03:41:01 -0700 (PDT)

The test for whether to show color-coded inline differences in
SVNLineDiff::ShowInlineDiff had some problems. In particular, it would
always fail if both ends of the line had changed, no matter how similar the
old and new lines were otherwise (since diffcounts = origcounts - 1 + #ends
that have changed). The new test also incorporates how fragmented the
differences are. The new test contains two double-valued parameters that may
be subject to individual preferences; the chosen values keep the behaviour
reasonably close to the old test (except for the end-changed problem, of
course): Single-token deletions or insertions will tend to be shown less
than before, single-token replacements or two-token deletions/insertions
will be unchanged, and multi-token changes will be shown more often than
before.

Summary:
Old test failed if both ends were changed, no matter how similar the lines
were otherwise (almost certainly unintentional; see r8518). New test
incorporates how fragmented the changes are.

Morten

http://old.nabble.com/file/p31617351/LineDiffTest.patch LineDiffTest.patch

-- 
View this message in context: http://old.nabble.com/Patch%3A-New-test-for-when-to-show-inline-diffs-tp31617351p31617351.html
Sent from the tortoisesvn - dev mailing list archive at Nabble.com.
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2736055
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-05-14 12:57:41 CEST

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

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