~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_subsume.py

[BROKEN] Many updates to stop using experimental formats in tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
    def make_branch_and_tree(self, relpath, format=None):
23
23
        if format is None:
24
 
            format = 'experimental-reference-dirstate'
 
24
            format = 'dirstate-with-subtree'
25
25
        return tests.TestCaseWithTransport.make_branch_and_tree(self, relpath, 
26
26
                                                                format)
27
27
 
28
28
    def make_trees(self, format=None, same_root=False):
29
 
        self.build_tree(['tree/', 
 
29
        self.build_tree(['tree/',
30
30
                         'tree/file',
31
31
                         'tree/subtree/',
32
32
                         'tree/subtree/file2'])
33
33
        base_tree = self.make_branch_and_tree('tree', format=format)
34
34
        base_tree.add('file', 'file-id')
35
35
        base_tree.commit('first commit', rev_id='tree-1')
36
 
        sub_tree = self.make_branch_and_tree('tree/subtree', 
37
 
                                             format='experimental-reference-dirstate')
 
36
        sub_tree = self.make_branch_and_tree('tree/subtree',
 
37
            format='dirstate-with-subtree')
38
38
        if same_root is True:
39
39
            sub_tree.set_root_id(base_tree.get_root_id())
40
40
        sub_tree.add('file2', 'file2-id')
77
77
        base_tree.commit('combined', rev_id='combined-1')
78
78
        self.assertEqual('file2-id', base_tree.path2id('subtree/file2'))
79
79
        self.assertEqual('subtree/file2', base_tree.id2path('file2-id'))
80
 
        self.assertEqualDiff(file2_contents, 
 
80
        self.assertEqualDiff(file2_contents,
81
81
                             base_tree.get_file_text('file2-id'))
82
82
        basis_tree = base_tree.basis_tree()
83
 
        self.assertEqualDiff(file2_contents, 
 
83
        basis_tree.lock_read()
 
84
        self.addCleanup(basis_tree.unlock)
 
85
        self.assertEqualDiff(file2_contents,
84
86
                             base_tree.get_file_text('file2-id'))
85
 
        self.assertEqualDiff(file2_contents, 
 
87
        self.assertEqualDiff(file2_contents,
86
88
                             basis_tree.get_file_text('file2-id'))
87
 
        self.assertEqual('subtree-1', 
 
89
        self.assertEqual('subtree-1',
88
90
                         basis_tree.inventory['file2-id'].revision)
89
 
        self.assertEqual('combined-1', 
 
91
        self.assertEqual('combined-1',
90
92
                         basis_tree.inventory[sub_root_id].revision)
91
93
 
92
94
    def test_subsume_failure(self):