Thoughts on Nested Branches: bzr init --nest?
Maritza Mendez
martitzam at gmail.com
Tue Apr 14 20:02:18 BST 2009
Even though I have used bzr to manage my own work, I must learn a lot about
deploying it for collaborative projects. So please indulge my simple email.
I notice something interesting about nested branches. I personally think
the project-within-a-project idea is asking for trouble, but I also know
that I have done it unintentionally in my own work. So my coworkers may
too. It's easy to do, because "bzr init" works in any directory which does
not already directly contain a .bzr subdirectory. So I have to be prepared
to manage this.
The bzr commands which act on one branch at a time (not counting plugins
like bzrtools which manage multiple branches) very logically act on the
nearest enclosing branch. Makes sense.
I also see that the Tortoise shell extension does not allow me to bzr init
in any directory which is contained by a directory (directlly or indirectly)
by a directory which directly contains a .bzr subdirectory. That's good for
me, but maybe not for some people. (I can still fool Tortoise by creating a
branch in a directory above the first branch...)
I wonder how often people need to create branches within branches compared
to how often this happens accidentally and causes problems. I believe in
individual responsibility but I also have to think about varying levels of
experience of the people on my team. I can't always control that. So it
would be nice if "bzr init" would refuse to create a nested branch (by
traversing up to / looking for an existing .bzr) unless the user says they
really mean it. A session could look like this:
~/martitza> bzr init Project_A
Created a standalone tree(format: pack-0.92)
~/martitza> cd Project_A
~/martitza/Project_A> mkdir flowers
~/martitza/Project_A> cd flowers
~/martitza/Project_A/flowers> bzr init Project_B
Branch not created! Enclosing brnach found at /home/martitza/Project_A
Use --nest to create nested branches.
~/martitza/Project_A/flowers> bzr init --nest Project_B
Created a standalone tree(format: pack-0.92)
Just a suggestion. This would be helpful for us, but maybe not others.
-M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/bazaar/attachments/20090414/14129e2e/attachment.htm
More information about the bazaar
mailing list