Call for testing of colocated branch support in

Martin Pool mbp at
Tue Feb 21 04:44:19 UTC 2012

One more thing in 2.5b5 and trunk, is that 'bzr remove-branch
COLO_BRANCH_NAME', actually removes the .bzr/branch directory, leaving
you with a broken (but recoverable) setup.  It's a bit of a trap
because this completes even if COLO_BRANCH_NAME is the name of a colo
branch and not of a file or directory:

mbp at joy% bzr init --format development-colo /tmp/t1
Created a standalone tree (format: development-colo)
mbp at joy% cd /tmp/t1
mbp at joy% bzr.trunk switch -b 1
mbp at joy% bzr branches
* 1
mbp at joy% bzr switch -b 2
Tree is up to date at revision 0.
Switched to branch: /tmp/t1/
mbp at joy% bzr.trunk remove-branch 1
mbp at joy% bzr branches
mbp at joy% bzr st
bzr: ERROR: Not a branch: "/tmp/t1/.bzr/branch/": location is a repository.

This is a bit like <> and perhaps the same bug.

  bzr remove-branch NAME

I think the cases we need to support are:

1 - remove a colocated branch (by default from the current repo,
probably no default for the branch name)
2 - remove a .bzr/branch directory

I think we could handle 1 with

  bzr remove-branch [-d DIR] COLO_NAME

and it must be a real named branch.

2- The current code is fine but we should probably have some checks
that the user is pointing to the root of a directory and perhaps to a
directory that contains only a branch (not a tree, not a repository).
And, for consistency with #1 (but breaking the ui a bit), we could
have the  location named by -d.

What do you think?

More information about the bazaar mailing list