90
90
os.chdir('branch2')
91
91
self.run_bzr('merge ../branch1/baz', retcode=3)
92
92
self.run_bzr('merge ../branch1/foo')
93
self.assertPathExists('foo')
94
self.assertPathDoesNotExist('bar')
93
self.failUnlessExists('foo')
94
self.failIfExists('bar')
95
95
wt2 = WorkingTree.open('.') # opens branch2
96
96
self.assertEqual([tip], wt2.get_parent_ids())
158
158
merge_inner(tree_b.branch, tree_a, tree_b.basis_tree(),
159
159
this_tree=tree_b, ignore_zero=True)
160
self.assertTrue('All changes applied successfully.\n' not in
160
self.failUnless('All changes applied successfully.\n' not in
163
163
merge_inner(tree_b.branch, tree_a, tree_b.basis_tree(),
164
164
this_tree=tree_b, ignore_zero=False)
165
self.assertTrue('All changes applied successfully.\n' in self.get_log())
165
self.failUnless('All changes applied successfully.\n' in self.get_log())
167
167
def test_merge_inner_conflicts(self):
168
168
tree_a = self.make_branch_and_tree('a')
1270
1270
self.assertEqual(['B-id', 'C-id', 'F-id'],
1271
1271
[t.get_revision_id() for t in merger._lca_trees])
1273
def test_find_base_new_root_criss_cross(self):
1280
builder = self.get_builder()
1281
builder.build_snapshot('A-id', None,
1282
[('add', ('', None, 'directory', None))])
1283
builder.build_snapshot('B-id', [],
1284
[('add', ('', None, 'directory', None))])
1285
builder.build_snapshot('D-id', ['A-id', 'B-id'], [])
1286
builder.build_snapshot('C-id', ['A-id', 'B-id'], [])
1287
merger = self.make_Merger(builder, 'D-id')
1288
self.assertEqual('A-id', merger.base_rev_id)
1289
self.assertTrue(merger._is_criss_cross)
1290
self.assertEqual(['A-id', 'B-id'], [t.get_revision_id()
1291
for t in merger._lca_trees])
1293
1273
def test_no_criss_cross_passed_to_merge_type(self):
1294
1274
class LCATreesMerger(LoggingMerger):
1295
1275
supports_lca_trees = True