/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/workingtree_implementations/test_workingtree.py

  • Committer: Aaron Bentley
  • Date: 2006-11-17 04:06:03 UTC
  • mfrom: (2139 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2162.
  • Revision ID: aaron.bentley@utoronto.ca-20061117040603-pgebxndswvwk26tt
Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
413
413
        self.failUnlessExists('checkout/file')
414
414
        self.assertEqual(['A'], old_tree.get_parent_ids())
415
415
 
 
416
    def test_update_sets_root_id(self):
 
417
        """Ensure tree root is set properly by update.
 
418
        
 
419
        Since empty trees don't have root_ids, but workingtrees do,
 
420
        an update of a checkout of revision 0 to a new revision,  should set
 
421
        the root id.
 
422
        """
 
423
        wt = self.make_branch_and_tree('tree')
 
424
        main_branch = wt.branch
 
425
        # create an out of date working tree by making a checkout in this
 
426
        # current format
 
427
        self.build_tree(['checkout/', 'tree/file'])
 
428
        checkout = main_branch.create_checkout('checkout')
 
429
        # now commit to 'tree'
 
430
        wt.add('file')
 
431
        wt.commit('A', rev_id='A')
 
432
        # and update checkout 
 
433
        self.assertEqual(0, checkout.update())
 
434
        self.failUnlessExists('checkout/file')
 
435
        self.assertEqual(wt.get_root_id(), checkout.get_root_id())
 
436
        self.assertNotEqual(None, wt.get_root_id())
 
437
 
416
438
    def test_update_returns_conflict_count(self):
417
439
        # working tree formats from the meta-dir format and newer support
418
440
        # setting the last revision on a tree independently of that on the