[RFC] branch --bind

Ian Clatworthy ian.clatworthy at canonical.com
Fri Jan 8 07:25:23 GMT 2010


Robert Collins wrote:
> On Fri, 2010-01-08 at 17:03 +1000, Ian Clatworthy wrote:
>>
>> As I pointed out in my original email, *my* driver for adding --bind
>> to
>> the cli is because it's the best and safest way to build a better GUI
>> for branch. I hope to do that soon, perhaps this weekend. 
> 
> The API is very shallow for this, I don't see why you need to change the
> CLI to make your GUI change. There are two command, qbzr can run them
> itself, or just call the main bzr API directly.

There's a fair amount of logic in cmd_branch, including locking. Calling
branch.bind() within the existing lock is a small change. If qbranch
called the two commands, it would be slightly less safe (lock wise) and
slightly slower. Trust me, if I could have made the change at the GUI
level and avoided this whole debate, I would have done that. :-( :-(
FWIW, poolie encouraged me to do otherwise so that the cli improved as
well, not just the GUI.

> I didn't see the same consensus you seem to:  bound branches remaining
> is totally different to this being a good UI change. I will take this
> point to chime in and say that I really do think this makes the bzr UI
> harder to explain and more likely to confuse people.

You'll need to explain why you think that. How does replacing 2 commands
with one makes the UI more confusing exactly?

Bound branches are a simple concept: a commit to the local branch also
gets committed to the master branch. That's dead easy to explain,
particularly to anyone familar with central VCS tools.

> Users making a new branch are *really* unlikely to want it bound, unless
> they actually want a checkout.

That's not true. It's perfectly reasonable to have a bound branch where
the local branch is treeless. If you want to emulate colocated branches
using a lightweight checkout today, that's perfectly reasonable.

> Setting the parent location for a bound
> branch to the master location is a bad idea as well, because commands
> like 'pull' become less useful.

Again I disagree. pull on a bound branch works fine - I do it several
times a day. pull on a checkout is currently less convenient btw (the
checkout command doesn't remember the parent location).

Ian C.



More information about the bazaar mailing list