~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge create_checkout_convenience update

Show diffs side-by-side

added added

removed removed

Lines of Context:
373
373
        tree.branch.generate_revision_history(bzrlib.revision.NULL_REVISION)
374
374
        self.assertEqual([], tree.branch.revision_history())
375
375
 
 
376
    def test_checkout_convenience(self):
 
377
        tree_a = self.make_branch_and_tree('a')
 
378
        branch_a = tree_a.branch
 
379
        checkout_b = branch_a.create_checkout_convenience('b')
 
380
        checkout_b.commit('rev1', rev_id='rev1')
 
381
        self.assertEqual('rev1', branch_a.last_revision())
 
382
        self.assertNotEqual(checkout_b.branch.base, branch_a.base)
 
383
 
 
384
        checkout_c = branch_a.create_checkout_convenience('c', 
 
385
                                                          lightweight=True)
 
386
        checkout_c.commit('rev2', rev_id='rev2')
 
387
        self.assertEqual('rev2', branch_a.last_revision())
 
388
        self.assertEqual(checkout_c.branch.base, branch_a.base)
 
389
 
 
390
        os.mkdir('d')
 
391
        checkout_d = branch_a.create_checkout_convenience('d', 
 
392
                                                          lightweight=True)
 
393
        os.mkdir('e')
 
394
        checkout_e = branch_a.create_checkout_convenience('e')
 
395
 
376
396
 
377
397
class ChrootedTests(TestCaseWithBranch):
378
398
    """A support class that provides readonly urls outside the local namespace.