notbrancherror blocks switch away from a deleted branch
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
If for some reason you have a checkout of a branch that's now deleted, you'll get a NotBranchError if you try to switch away from it, which is unfortunate:
Tue 2012-02-21 15:48:23 +1100
0.052 bazaar version: 2.6.0dev1
0.052 bzr arguments: [u'switch', u'remove-bsondump']
0.053 looking for plugins in /home/mbp/
0.097 looking for plugins in /home/mbp/
0.097 Plugin name launchpad already loaded
0.098 looking for plugins in /usr/lib/
0.098 Plugin name bash_completion already loaded
0.098 Plugin name changelog_merge already loaded
0.098 Plugin name launchpad already loaded
0.098 Plugin name netrc_credentia
0.098 Plugin name news_merge already loaded
0.098 Plugin name po_merge already loaded
0.098 Plugin name weave_fmt already loaded
0.101 encoding stdout as sys.stdout encoding 'UTF-8'
0.119 Transferred: 0kB (0.0kB/s r:0kB w:0kB)
0.121 Traceback (most recent call last):
File "/home/
return the_callable(*args, **kwargs)
File "/home/
ret = run(*run_argv)
File "/home/
return self.run(
File "/home/
return self._operation
File "/home/
self.cleanups, self.func, *args, **kwargs)
File "/home/
result = func(*args, **kwargs)
File "/home/
switch.
File "/home/
_check_
File "/home/
raise ex
NotBranchError: Not a branch: "/home/
It might be better if bzr just warned you the old branch was gone and switched without checking, or something like that.
using --force makes the switch work, so this bug could be closed by just giving you a clean error suggesting you should use it