Mercurial > hg
comparison tests/test-bdiff.py.out @ 30433:96f2f50d923f
bdiff: give slight preference to removing trailing lines
[This change could be folded into the previous changeset to minimize the repo
churn ...]
Similar to the previous change, introduce an exception to the general
preference for matches in the middle of bdiff ranges: If the best match on the
B side starts at the beginning of the bdiff range, don't aim for the
middle-most A side match but for the earliest.
New (later) matches on the A side will only be considered better if the
corresponding match on the B side *not* is at the beginning of the range.
Thus, if the best (middle-most) match on the B side turns out to be at the
beginning of the range, the earliest match on the A side will be used.
The bundle size for 4.0 (hg bundle --base null -r 4.0 x.hg) happens to go from
22807275 to 22808120 bytes - a 0.004% increase.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 15 Nov 2016 21:56:49 +0100 |
parents | 3633403888ae |
children | 7c0c722d568d |
comparison
equal
deleted
inserted
replaced
30432:3633403888ae | 30433:96f2f50d923f |
---|---|
66 showdiff( | 66 showdiff( |
67 'a\n', | 67 'a\n', |
68 'a\na\na\na\na\n'): | 68 'a\na\na\na\na\n'): |
69 'a\n' | 69 'a\n' |
70 2 2 '' -> 'a\na\na\na\n' | 70 2 2 '' -> 'a\na\na\na\n' |
71 Diff 3 to 1 lines - preference for balanced recursion: | 71 Diff 3 to 1 lines - preference for removing trailing lines: |
72 showdiff( | 72 showdiff( |
73 'a\na\na\n', | 73 'a\na\na\n', |
74 'a\n'): | 74 'a\n'): |
75 0 2 'a\n' -> '' | |
76 'a\n' | 75 'a\n' |
77 4 6 'a\n' -> '' | 76 2 6 'a\na\n' -> '' |
78 Diff 5 to 1 lines - preference for balanced recursion: | 77 Diff 5 to 1 lines - preference for removing trailing lines: |
79 showdiff( | 78 showdiff( |
80 'a\na\na\na\na\n', | 79 'a\na\na\na\na\n', |
81 'a\n'): | 80 'a\n'): |
82 0 4 'a\na\n' -> '' | |
83 'a\n' | 81 'a\n' |
84 6 10 'a\na\n' -> '' | 82 2 10 'a\na\na\na\n' -> '' |