1095
1095
'>>>>>>> MERGE-SOURCE\n'
1096
1096
'line 4\n', 'this/file1')
1098
def test_modify_conflicts_with_delete(self):
1099
# If one side deletes a line, and the other modifies that line, then
1100
# the modification should be considered a conflict
1101
builder = self.make_branch_builder('test')
1102
builder.start_series()
1103
builder.build_snapshot('BASE-id', None,
1104
[('add', ('', None, 'directory', None)),
1105
('add', ('foo', 'foo-id', 'file', 'a\nb\nc\nd\ne\n')),
1108
builder.build_snapshot('OTHER-id', ['BASE-id'],
1109
[('modify', ('foo-id', 'a\nc\nd\ne\n'))])
1110
# Modify 'b\n', add 'X\n'
1111
builder.build_snapshot('THIS-id', ['BASE-id'],
1112
[('modify', ('foo-id', 'a\nb2\nc\nd\nX\ne\n'))])
1113
builder.finish_series()
1114
branch = builder.get_branch()
1115
this_tree = branch.bzrdir.create_workingtree()
1116
this_tree.lock_write()
1117
self.addCleanup(this_tree.unlock)
1118
other_tree = this_tree.bzrdir.sprout('other', 'OTHER-id').open_workingtree()
1119
self.do_merge(this_tree, other_tree)
1120
if self.merge_type is _mod_merge.LCAMerger:
1121
self.expectFailure("lca merge doesn't track deleted lines",
1122
self.assertFileEqual,
1127
'>>>>>>> MERGE-SOURCE\n'
1133
self.assertFileEqual(
1138
'>>>>>>> MERGE-SOURCE\n'
1099
1145
class TestMerge3Merge(TestCaseWithTransport, TestMergeImplementation):