~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_checkout.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-03-06 00:49:26 UTC
  • mfrom: (1587.1.14 bound-branches)
  • Revision ID: pqm@pqm.ubuntu.com-20060306004926-6d7a10c990bc17d1
Merge in bound branches core support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
        tree.add('added_in_2')
38
38
        tree.commit('2', rev_id='2')
39
39
 
40
 
    def test_checkout_makes_checkout(self):
 
40
    def test_checkout_makes_bound_branch(self):
41
41
        self.runbzr('checkout branch checkout')
42
42
        # if we have a checkout, the branch base should be 'branch'
43
43
        source = bzrdir.BzrDir.open('branch')
44
44
        result = bzrdir.BzrDir.open('checkout')
45
45
        self.assertEqual(source.open_branch().bzrdir.root_transport.base,
 
46
                         result.open_branch().get_bound_location())
 
47
 
 
48
    def test_checkout_light_makes_checkout(self):
 
49
        self.runbzr('checkout --lightweight branch checkout')
 
50
        # if we have a checkout, the branch base should be 'branch'
 
51
        source = bzrdir.BzrDir.open('branch')
 
52
        result = bzrdir.BzrDir.open('checkout')
 
53
        self.assertEqual(source.open_branch().bzrdir.root_transport.base,
46
54
                         result.open_branch().bzrdir.root_transport.base)
47
55
 
48
56
    def test_checkout_dash_r(self):
53
61
        self.assertEqual('1', result.open_workingtree().last_revision())
54
62
        self.failIfExists('checkout/added_in_2')
55
63
 
 
64
    def test_checkout_light_dash_r(self):
 
65
        self.runbzr('checkout --lightweight -r -2 branch checkout')
 
66
        # the working tree should now be at revision '1' with the content
 
67
        # from 1.
 
68
        result = bzrdir.BzrDir.open('checkout')
 
69
        self.assertEqual('1', result.open_workingtree().last_revision())
 
70
        self.failIfExists('checkout/added_in_2')
 
71