checkout/bound branch confusion

Scott Aubrey scottaubrey at capuk.org
Tue Aug 18 11:37:42 BST 2009


Hello bzr devs.

I just had a small confused moment, and thought i'd post my take on things.

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.

So this is what I did (directory/branch names replaced):

mkdir test-repo
bzr init-repo test-repo --no-trees
cd test-repo
bzr co bzr+ssh://server/project/trunk

I chose to do a checkout because there is no way to bind a branch at 
creation, and was trying to save the time of an extra "bind" command. 
This was fine, but the bit that confused me for a while was that the 
"checkout" produced a working tree, despite the --no-trees flag.

Then it hit me that despite most things between a checkout and a bound 
branch being identical, a checkout is conceptually used to create 
working trees, and really, I should have used bzr branch. Unfortunately, 
there is not was to create a bound branch at creation time, so to 
finished the setup, I'm required to do a two step process. Not only 
that, the bzr bind doesn't automatically use the parent branch, so I had 
to actually do (after the above):

rm -r trunk/
bzr branch bzr+ssh://server/project/trunk
cd trunk
bzr bind bzr+ssh://server/project/trunk

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?
   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?

Thanks!

- Scott Aubrey

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20090818/a001a2c1/attachment.htm 


More information about the bazaar mailing list