~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_reconfigure.py

  • Committer: Aaron Bentley
  • Date: 2008-01-18 03:53:52 UTC
  • mto: This revision was merged to the branch mainline in revision 3196.
  • Revision ID: abentley@panoramicfeedback.com-20080118035352-kvjf5v87xwfet04n
Add lightweight-checkout-to-checkout tags test

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
        checkout_branch = checkout.bzrdir.open_branch()
87
87
        self.assertEqual('bar', checkout_branch.tags.lookup_tag('foo'))
88
88
 
 
89
    def prepare_lightweight_checkout_to_checkout(self):
 
90
        branch = self.make_branch('branch')
 
91
        checkout = branch.create_checkout('checkout', lightweight=True)
 
92
        reconfiguration = reconfigure.Reconfigure.to_checkout(checkout.bzrdir)
 
93
        return reconfiguration, checkout
 
94
 
89
95
    def test_lightweight_checkout_to_checkout(self):
90
 
        branch = self.make_branch('branch')
91
 
        checkout = branch.create_checkout('checkout', lightweight=True)
92
 
        reconfiguration = reconfigure.Reconfigure.to_checkout(checkout.bzrdir)
 
96
        reconfiguration, checkout = \
 
97
            self.prepare_lightweight_checkout_to_checkout()
93
98
        reconfiguration.apply()
94
99
        checkout_branch = checkout.bzrdir.open_branch()
95
100
        self.assertIsNot(checkout_branch.get_bound_location(), None)
96
101
 
 
102
    def test_lightweight_checkout_to_checkout_tags(self):
 
103
        reconfiguration, checkout = \
 
104
            self.prepare_lightweight_checkout_to_checkout()
 
105
        checkout.branch.tags.set_tag('foo', 'bar')
 
106
        reconfiguration.apply()
 
107
        checkout_branch = checkout.bzrdir.open_branch()
 
108
        self.assertEqual('bar', checkout_branch.tags.lookup_tag('foo'))
 
109
 
97
110
    def test_lightweight_conversion_uses_shared_repo(self):
98
111
        parent = self.make_branch('parent')
99
112
        shared_repo = self.make_repository('repo', shared=True)