Rev 101: Fix switch -b for non-loom branches [test in bzr core. in http://bazaar.launchpad.net/~bzr-loom-devs/bzr-loom/trunk/
Robert Collins
robertc at robertcollins.net
Tue Sep 22 06:18:00 BST 2009
At http://bazaar.launchpad.net/~bzr-loom-devs/bzr-loom/trunk/
------------------------------------------------------------
revno: 101
revision-id: robertc at robertcollins.net-20090922051758-cdmsmuh8k5i0sn4s
parent: robertc at robertcollins.net-20090922034300-7rw3haaucubn32ae
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Tue 2009-09-22 15:17:58 +1000
message:
Fix switch -b for non-loom branches [test in bzr core.
=== modified file 'commands.py'
--- a/commands.py 2009-09-22 03:40:53 +0000
+++ b/commands.py 2009-09-22 05:17:58 +0000
@@ -204,13 +204,13 @@
def run(self, to_location, force=False, create_branch=False):
(tree, path) = workingtree.WorkingTree.open_containing('.')
- if create_branch:
- return branch.create_thread(tree.branch, to_location)
tree = LoomTreeDecorator(tree)
try:
+ if create_branch:
+ return branch.create_thread(tree.branch, to_location)
thread_name = self._get_thread_name(tree.branch, to_location)
return tree.down_thread(thread_name)
- except (AttributeError, branch.NoSuchThread):
+ except (AttributeError, branch.NoSuchThread, branch.NotALoom):
# When there is no thread its probably an external branch
# that we have been given.
raise errors.MustUseDecorated
More information about the bazaar-commits
mailing list