18
18
from StringIO import StringIO
20
from bzrlib import conflicts
20
21
from bzrlib.branch import Branch
21
22
from bzrlib.builtins import merge
22
23
from bzrlib.conflicts import ConflictList, TextConflict
148
149
tree_a.set_conflicts(ConflictList([TextConflict('patha')]))
149
150
merge_inner(tree_a.branch, tree_a, tree_a, this_tree=tree_a)
150
151
self.assertEqual(1, len(tree_a.conflicts()))
153
def test_rmdir_conflict(self):
154
tree_a = self.make_branch_and_tree('a')
155
self.build_tree(['a/b/'])
156
tree_a.add('b', 'b-id')
157
tree_a.commit('added b')
158
base_tree = tree_a.basis_tree()
159
tree_z = tree_a.bzrdir.sprout('z').open_workingtree()
160
self.build_tree(['a/b/c'])
162
tree_a.commit('added c')
164
tree_z.commit('removed b')
165
merge_inner(tree_z.branch, tree_a, base_tree, this_tree=tree_z)
167
conflicts.MissingParent('Created directory', 'b', 'b-id'),
168
conflicts.UnversionedParent('Versioned directory', 'b', 'b-id')],
170
merge_inner(tree_a.branch, tree_z.basis_tree(), base_tree,
173
conflicts.DeletingParent('Not deleting', 'b', 'b-id'),
174
conflicts.UnversionedParent('Versioned directory', 'b', 'b-id')],