~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge.py

Merge bzr.dev to resolve news conflict

Show diffs side-by-side

added added

removed removed

Lines of Context:
1270
1270
        self.assertEqual(['B-id', 'C-id', 'F-id'],
1271
1271
                         [t.get_revision_id() for t in merger._lca_trees])
1272
1272
 
 
1273
    def test_find_base_new_root_criss_cross(self):
 
1274
        # A   B
 
1275
        # |\ /|
 
1276
        # | X |
 
1277
        # |/ \|
 
1278
        # C   D
 
1279
        
 
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])
 
1292
 
1273
1293
    def test_no_criss_cross_passed_to_merge_type(self):
1274
1294
        class LCATreesMerger(LoggingMerger):
1275
1295
            supports_lca_trees = True