Bound branch implementation

John A Meinel john at arbash-meinel.com
Mon Nov 14 22:29:51 GMT 2005


Robert Collins wrote:
> On Sat, 2005-11-12 at 22:04 -0600, John A Meinel wrote:
> ...
>> $ bzr get --bound /path/to/other/branch local_branch
>> $ cd local_branch
>> <hack hack>
>> $ bzr commit -m "Added a new feature"
>> # At this point, the remote branch will be updated with
>> # the same commit
>> <hack some more>
>> # Someone commits to /path/to/other/branch in the meantime
>> $ bzr commit -m "Another new feature"
>> bzr: ERROR: Remote branch has been updated, use bzr pull to update
>> $ bzr pull
>> # Review new changes to tree
> 
> The more I think about it, the more I feel that 
> $ bzr pull
> in a bound branch should pull from the location of parent in the
> bound-to branch, and we should be using 
> $ bzr update
> for both checkouts and bound branches to 'get stuff from the centralised
> branch'.
> 

I've started working on this, because I sort of agree with you. The
problem is that you can bind the branch a checkout points to.
So if you do:

branch B1 # The published branch in a centralized location
branch B2 # The branch in my local archive, so I can work offline
checkout C1 # My local checkout of B2
checkout C2 # Another checkout for some reason
If there is a change introduced by C1, you need a way to let C2 know
about it. At the same time, if there is a change introduced into B1, you
need to pull that into B2, and then updated both C1 and C2.

Otherwise I was thinking about using the heuristic for 'bzr pull' that
if bound_loc == parent, then use bound_loc's parent.

John
=:->


> 
> Rob


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051114/5c7cde5d/attachment.pgp 


More information about the bazaar mailing list