373
373
tree.branch.generate_revision_history(bzrlib.revision.NULL_REVISION)
374
374
self.assertEqual([], tree.branch.revision_history())
376
def test_checkout_convenience(self):
376
def test_create_checkout(self):
377
377
tree_a = self.make_branch_and_tree('a')
378
378
branch_a = tree_a.branch
379
checkout_b = branch_a.create_checkout_convenience('b')
379
checkout_b = branch_a.create_checkout('b')
380
380
checkout_b.commit('rev1', rev_id='rev1')
381
381
self.assertEqual('rev1', branch_a.last_revision())
382
382
self.assertNotEqual(checkout_b.branch.base, branch_a.base)
384
checkout_c = branch_a.create_checkout_convenience('c',
384
checkout_c = branch_a.create_checkout('c', lightweight=True)
386
385
checkout_c.commit('rev2', rev_id='rev2')
387
386
self.assertEqual('rev2', branch_a.last_revision())
388
387
self.assertEqual(checkout_c.branch.base, branch_a.base)
391
checkout_d = branch_a.create_checkout_convenience('d',
390
checkout_d = branch_a.create_checkout('d', lightweight=True)
394
checkout_e = branch_a.create_checkout_convenience('e')
392
checkout_e = branch_a.create_checkout('e')
397
395
class ChrootedTests(TestCaseWithBranch):