~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_branch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-08-14 15:36:22 UTC
  • mfrom: (1551.8.5 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20060814153622-a58babcb7b36ffca
Add Branch.create_checkout method

Show diffs side-by-side

added added

removed removed

Lines of Context:
396
396
        tree.branch.generate_revision_history(bzrlib.revision.NULL_REVISION)
397
397
        self.assertEqual([], tree.branch.revision_history())
398
398
 
 
399
    def test_checkout_convenience(self):
 
400
        tree_a = self.make_branch_and_tree('a')
 
401
        branch_a = tree_a.branch
 
402
        checkout_b = branch_a.create_checkout('b')
 
403
        checkout_b.commit('rev1', rev_id='rev1')
 
404
        self.assertEqual('rev1', branch_a.last_revision())
 
405
        self.assertNotEqual(checkout_b.branch.base, branch_a.base)
 
406
 
 
407
        checkout_c = branch_a.create_checkout('c', lightweight=True)
 
408
        checkout_c.commit('rev2', rev_id='rev2')
 
409
        self.assertEqual('rev2', branch_a.last_revision())
 
410
        self.assertEqual(checkout_c.branch.base, branch_a.base)
 
411
 
 
412
        os.mkdir('d')
 
413
        checkout_d = branch_a.create_checkout('d', lightweight=True)
 
414
        os.mkdir('e')
 
415
        checkout_e = branch_a.create_checkout('e')
 
416
 
399
417
 
400
418
class ChrootedTests(TestCaseWithBranch):
401
419
    """A support class that provides readonly urls outside the local namespace.