Bound branch implementation
Erik Bågfors
zindar at gmail.com
Mon Nov 14 11:57:25 GMT 2005
2005/11/13, John A Meinel <john at arbash-meinel.com>:
> One use case that comes up fairly often is wanting to have a public
> location where people can download your branches, while still having a
> local branch that you can use offline.
> Also, frequently people want to have some sort of centralized
> development, where they have a shared branch that multiple people can
> commit to. In this sort of mode, you have to update your local tree
> before you can commit.
>
> So, I think I have an implementation which works. It is built off of
> Robert's integration branch, and is available from here:
> http://bzr.arbash-meinel.com/branches/bzr/bound-branch/
>
> Eventually, we want to put this into bzr core, but first I would like to
> get some feedback. I made sure committing when bound has a decent error
> message, but I'm not sure that I've tracked down all the other
> possibilities.
>
> My test cases work, indicating the functionality is there, but that
> doesn't mean the user interface is perfect. Also, I believe it will fail
> when bound to a remote tree, since we can't update remote WorkingTrees.
> I don't know if we will support updating remote trees, or just creating
> branches without remote working trees.
>
> But if you're willing, play around with it.
I just played around with this and all I can say is.... WOW! This is
just amazing.
I really don't think the user interface is that terrible except when
you bind back to a branch after being unbounded for a while. What you
have to do then is
$ bzr merge [ this defaults to the right branch ]
$ bzr ci -m 'merge'
$ bzr push sftp:// [ this doesn't default to the right branch ]
$ bzr bind
So that's four commands to rebind. I'd like to simplify that, but at
the same time you have to do a commit manually (since you might have
to solve some conflicts). Perhaps "bzr bind" should try to push first
if possible.
That way if no changes to the remote branch
$ bzr bind
bzr: changes have been pushed, you are now bounded.
If there are changes to the remote branch
$ bzr bind
bzr: ERROR: These branches have diverged. Try merging and commiting.
$ bzr merge
$ bzr commit -m merged'
$ bzr bind
bzr: changes have been pushed, you are now bounded.
That way you don't have to do the push-thing at least, but just the
"normal" merge/commit operation.
But maybe it can be made even better.
Regards,
Erik
More information about the bazaar
mailing list