checkout/bound branch confusion

Ian Clatworthy ian.clatworthy at
Tue Aug 18 13:15:56 BST 2009

Scott Aubrey wrote:
> Hello bzr devs.
> I just had a small confused moment, and thought i'd post my take on things.

Thanks for taking the time to do this.

> I wanted to create a shared repo, with a mirror of the mainline of a
> project. I was planning on using bzr init-repo --no-trees, then creating
> branches in the local repo, and using a bzr co --lightweight for my
> working tree, using bzr switch to change between them.

That's a very common pattern and we don't make it as easy as we should
to set up.

> So i guess I'm emailing to ask:
>    1. is there a "quicker" (as in less commands) to create the scenario
>       above? I guess a bzr co, followed by bzr remove-tree would work too?

Use bzr branch and follow that with bzr bind.

>    2. I believe there is a plan to have bzr branch --bind flag and
>       making --lightweight default, but is there a timescale? It doesn't
>       strike me as being that difficult to implement (not knowing
>       anything about bazaar code, or python) and would make them work
>       conceptually. is it waiting for approval of the community/3.0?

The core team is very focussed on getting Bazaar 2.0 out the door. If
someone from the community put up patches for these in the next 2 weeks,
I'd certainly vote for them to be included in 2.0 assuming test coverage
and documentation was adequate.

The first one, adding a --bind option to branch, ought to be simple and
I can't think of any reason why anyone would object.

The second one, changing checkout so --lightweight is the default, is a
simple code change but it's bigger than it first appears. I suspect
quite a few tests will need tweaking but they should be easy to find (by
running bzr selftest). The messier bit is updating the user
documentation including the User Guide, Quick Reference cards and
probably some of the tutorials. So I don't want to discourage anyone
from doing it but I want to put the ground rules (mine at least) on the
table before anyone invests time and energy into tackling this.

I'd be really pleased if even the first of these was done. In the GUI
layer, I want to extend qbranch with a 'Bind branch' checkbox and it
would make my life much easier if that checkbox simply delegated the
work to an option on bzr branch (vs calling 2 bzr commands).

Ian C.

More information about the bazaar mailing list