Comment 2 for bug 920653

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 920653] Re: "bzr rmbranch" doesn't handle colocated branches

On 02/02/2012 09:29 PM, Aaron Bentley wrote:
> With bzr.dev revno 6460, rmbranch doesn't remove the branch, just the
> asterisk:
>
> $ bzr branches
> first-colo-branch
> * second-colo-branch
> $ bzr switch first-colo-branch
> Tree is up to date at revision 0.
> Switched to branch: /home/abentley/sandbox/foo/
> $ bzr rmbranch second-colo-branch
> $ bzr branches
> first-colo-branch
> second-colo-branch
rmbranch calls "BzrDir.open_containing". That resolves to
$PWD/second-colo-branch. second-colo-branch isn't a branch, so $PWD is
opened. And then $PWD (.bzr/branch) gets removed, which is what causes
the asterisk to go away.

Cheers,

Jelmer