Michal Matyl <Michal.Matyl@zf.com>


r1731699 | rhuijben | 2016-02-22 17:42:58 +0000 (Mon, 22 Feb 2016)

[Note from the future: reverted in r1795861.]

Make our 3-way-diff/merge handling raise a conflict in a very specific case
where changes in different ranges that touched each other were applied as
adding both ranges in Subversion while other merge tools create a conflict.

With our current diff output on these conflicts the conflict is much easier
to diagnose and resolve than it was in 2003 when this behavior was first
documented by adding a regression test.

This resolves the problem
Found by: Michal Matyl <Michal.Matyl{_AT_}zf.com>
which is essentially about the controversial behavior discussed in 2003 in

The patch_tests.py change is a good example of the change.

* subversion/libsvn_diff/diff3.c
  (svn_diff_diff3_2): Merge adjacent svn_diff__type_diff_modified and
    svn_diff__type_diff_latest ranges to a single conflict range.

* subversion/tests/cmdline/patch_tests.py
  (patch_merge): Remove XFail marker. Update expected result.

* subversion/tests/libsvn_diff/diff-diff3-test.c
  (merge_adjacent_changes): Update expected result.
  (three_way_double_add): Tweak expected result.
  (test_funcs): Mark three_way_double_add as PASS.