~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree_4.py

merge dirstate and trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
447
447
        tree3 = tree1.bzrdir.sprout('tree3').open_workingtree()
448
448
        self.assertEqual(tree3.get_root_id(), tree1.get_root_id())
449
449
 
 
450
    def test_unique_root_id_per_tree(self):
 
451
        # each time you initialize a new tree, it gets a different root id
 
452
        ## format_name = 'experimental-reference-dirstate'
 
453
        tree1 = self.make_branch_and_tree('tree1')
 
454
        tree2 = self.make_branch_and_tree('tree2')
 
455
        self.assertNotEqual(tree1.get_root_id(), tree2.get_root_id())
 
456
        # when you branch, it inherits the same root id
 
457
        rev1 = tree1.commit('first post')
 
458
        tree3 = tree1.bzrdir.sprout('tree3').open_workingtree()
 
459
        self.assertEqual(tree3.get_root_id(), tree1.get_root_id())
 
460
 
450
461
    def test_set_root_id(self):
451
462
        # similar to some code that fails in the dirstate-plus-subtree branch
452
463
        # -- setting the root id while adding a parent seems to scramble the