86
86
checkout_branch = checkout.bzrdir.open_branch()
87
87
self.assertEqual('bar', checkout_branch.tags.lookup_tag('foo'))
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
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)
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'))
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)