147
155
# => new branch will be created, but switch fails and the current
151
160
self.run_bzr_error(['Cannot switch a branch, only a checkout'],
152
161
'branch --switch ../a ../b', working_dir='current')
153
162
a = branch.Branch.open('a')
154
163
b = branch.Branch.open('b')
155
164
self.assertEqual(a.last_revision(), b.last_revision())
156
165
work = branch.Branch.open('current')
159
174
def test_branch_switch_checkout(self):
160
175
# Checkout in the current directory: