~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree_4.py

MergeĀ lp:bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
212
212
        rev1 = subtree.commit('commit in subdir')
213
213
        rev1_tree = subtree.basis_tree()
214
214
        rev1_tree.lock_read()
215
 
        rev1_tree.inventory
 
215
        rev1_tree.root_inventory
216
216
        self.addCleanup(rev1_tree.unlock)
217
217
        rev2 = subtree.commit('second commit in subdir', allow_pointless=True)
218
218
        rev2_tree = subtree.basis_tree()
219
219
        rev2_tree.lock_read()
220
 
        rev2_tree.inventory
 
220
        rev2_tree.root_inventory
221
221
        self.addCleanup(rev2_tree.unlock)
222
222
 
223
223
        tree.branch.pull(subtree.branch)
516
516
 
517
517
    def test_unique_root_id_per_tree(self):
518
518
        # each time you initialize a new tree, it gets a different root id
519
 
        format_name = 'dirstate-with-subtree'
 
519
        format_name = 'development-subtree'
520
520
        tree1 = self.make_branch_and_tree('tree1',
521
521
            format=format_name)
522
522
        tree2 = self.make_branch_and_tree('tree2',
552
552
        tree = self.make_branch_and_tree('tag', format='dirstate-tags')
553
553
        self.assertEqual(inventory.ROOT_ID, tree.get_root_id())
554
554
        tree = self.make_branch_and_tree('subtree',
555
 
                                         format='dirstate-with-subtree')
 
555
                                         format='development-subtree')
556
556
        self.assertNotEqual(inventory.ROOT_ID, tree.get_root_id())
557
557
 
558
558
    def test_non_subtree_with_nested_trees(self):
559
559
        # prior to dirstate, st/diff/commit ignored nested trees.
560
 
        # dirstate, as opposed to dirstate-with-subtree, should
 
560
        # dirstate, as opposed to development-subtree, should
561
561
        # behave the same way.
562
562
        tree = self.make_branch_and_tree('.', format='dirstate')
563
563
        self.assertFalse(tree.supports_tree_reference())
603
603
        tree.unlock()
604
604
 
605
605
    def test_with_subtree_supports_tree_references(self):
606
 
        # dirstate-with-subtree should support tree-references.
607
 
        tree = self.make_branch_and_tree('.', format='dirstate-with-subtree')
 
606
        # development-subtree should support tree-references.
 
607
        tree = self.make_branch_and_tree('.', format='development-subtree')
608
608
        self.assertTrue(tree.supports_tree_reference())
609
609
        # having checked this is on, the tree interface, and intertree
610
610
        # interface tests, will proceed to test the subtree support of
866
866
        self.addCleanup(tree.unlock)
867
867
        # Force access to the in memory inventory to trigger bug #494221: try
868
868
        # maintaining the in-memory inventory
869
 
        inv = tree.inventory
 
869
        inv = tree.root_inventory
870
870
        self.assertTrue(inv.has_id('a-id'))
871
871
        self.assertTrue(inv.has_id('b-id'))
872
872
        tree.unversion(['a-id', 'b-id'])