89
89
l = ConflictList([TextConflict('hello')])
90
90
l.remove_files(tree)
92
def test_select_conflicts(self):
93
tree = self.make_branch_and_tree('.')
94
tree_conflicts = ConflictList([ContentsConflict('foo'),
95
ContentsConflict('bar')])
96
self.assertEqual((ConflictList([ContentsConflict('bar')]),
97
ConflictList([ContentsConflict('foo')])),
98
tree_conflicts.select_conflicts(tree, ['foo']))
99
self.assertEqual((ConflictList(), tree_conflicts),
100
tree_conflicts.select_conflicts(tree, [''],
101
ignore_misses=True, recurse=True))
102
tree_conflicts = ConflictList([ContentsConflict('foo/baz'),
103
ContentsConflict('bar')])
104
self.assertEqual((ConflictList([ContentsConflict('bar')]),
105
ConflictList([ContentsConflict('foo/baz')])),
106
tree_conflicts.select_conflicts(tree, ['foo'],
109
tree_conflicts = ConflictList([PathConflict('qux', 'foo/baz')])
110
self.assertEqual((ConflictList(), tree_conflicts),
111
tree_conflicts.select_conflicts(tree, ['foo'],
114
self.assertEqual((tree_conflicts, ConflictList()),
115
tree_conflicts.select_conflicts(tree, ['foo'],
93
119
class TestConflictStanzas(TestCase):