[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [stellation-res] Text merge test case
|
Here's my analysis of test18. The test as formulated in
the test suite looks like this:
:test18
# Tests for a pair of non-conflicting changes, one in each of the delta
# and target sequences plus a common change from the base in another
line.
# Base sequence Delta Sequence Target Sequence Expected
Sequence
abc abc abc abc
abc abc abc abc
abc abc xyz xyz
xyz abc abc abc
abc xyz abc xyz
abc abc abc abc
abc abc abc abc
The Stellation merge algorithm sees this as follows:
Delta inserts a line "abc" into base at line 0, and deletes the last
line.
Target inserts an xyz at line 2, and deletes the xyz that
was originally at line 4.
So the merge should have the deletion of the lines 3 and 6
from the base->delta, and the insertion of the "xyz" at
line 2 from target.
So the correct result is [abc, abc, abc, xyz, abc, abc, abc].
This is not the correct result in the test suite document.
The result that comes out of my current code is
[abc, abc, abc, xyz, abc, abc, abc, abc]. (That is, is misses the
deletion of the final "abc" from delta.)
So there's still a bug here - it looks like it's
related to the same trailing-segment off-by-one error
that I've already seen, but haven't fixed yet.
-Mark
--
Mark Craig Chu-Carroll, IBM T.J. Watson Research Center
*** The Stellation project: Advanced SCM for Collaboration
*** http://www.eclipse.org/stellation
*** Work Email: mcc@xxxxxxxxxxxxxx ------- Personal Email: markcc@xxxxxxxxxxx