If for some reason you have a checkout of a branch that's not 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/.bazaar/plugins
0.097 looking for plugins in /home/mbp/bzr/trunk/bzrlib/plugins
0.097 Plugin name launchpad already loaded
0.098 looking for plugins in /usr/lib/python2.7/dist-packages/bzrlib/plugins
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_credential_store already loaded
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/mbp/bzr/trunk/bzrlib/commands.py", line 930, in exception_to_return_code
return the_callable(*args, **kwargs)
File "/home/mbp/bzr/trunk/bzrlib/commands.py", line 1141, in run_bzr
ret = run(*run_argv)
File "/home/mbp/bzr/trunk/bzrlib/commands.py", line 673, in run_argv_aliases
return self.run(**all_cmd_args)
File "/home/mbp/bzr/trunk/bzrlib/commands.py", line 697, in run
return self._operation.run_simple(*args, **kwargs)
File "/home/mbp/bzr/trunk/bzrlib/cleanup.py", line 136, in run_simple
self.cleanups, self.func, *args, **kwargs)
File "/home/mbp/bzr/trunk/bzrlib/cleanup.py", line 166, in _do_with_cleanups
result = func(*args, **kwargs)
File "/home/mbp/bzr/trunk/bzrlib/builtins.py", line 6257, in run
switch.switch(control_dir, to_branch, force, revision_id=revision)
File "/home/mbp/bzr/trunk/bzrlib/switch.py", line 43, in switch
_check_pending_merges(control_dir, force)
File "/home/mbp/bzr/trunk/bzrlib/switch.py", line 69, in _check_pending_merges
raise ex
NotBranchError: Not a branch: "/home/mbp/launchpad/lp-branches/work/.bzr/branches/936762-setuplxc-shell/".
It might be better if bzr just warned you the old branch was gone and switched without checking, or something like that.
If for some reason you have a checkout of a branch that's not 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 .bazaar/ plugins bzr/trunk/ bzrlib/ plugins python2. 7/dist- packages/ bzrlib/ plugins l_store already loaded mbp/bzr/ trunk/bzrlib/ commands. py", line 930, in exception_ to_return_ code mbp/bzr/ trunk/bzrlib/ commands. py", line 1141, in run_bzr mbp/bzr/ trunk/bzrlib/ commands. py", line 673, in run_argv_aliases **all_cmd_ args) mbp/bzr/ trunk/bzrlib/ commands. py", line 697, in run .run_simple( *args, **kwargs) mbp/bzr/ trunk/bzrlib/ cleanup. py", line 136, in run_simple mbp/bzr/ trunk/bzrlib/ cleanup. py", line 166, in _do_with_cleanups mbp/bzr/ trunk/bzrlib/ builtins. py", line 6257, in run switch( control_ dir, to_branch, force, revision_ id=revision) mbp/bzr/ trunk/bzrlib/ switch. py", line 43, in switch pending_ merges( control_ dir, force) mbp/bzr/ trunk/bzrlib/ switch. py", line 69, in _check_ pending_ merges mbp/launchpad/ lp-branches/ work/.bzr/ branches/ 936762- setuplxc- shell/" .
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.