Bound branches revisited

John A Meinel john at arbash-meinel.com
Sat Dec 31 17:43:41 GMT 2005


Kevin Smith wrote:
> John A Meinel wrote:
>> Now the question is, I think binding to B should update the A's working
>> directory (same as 'pull').
>> But should binding to B update B's working directory? This obviously
>> could only happen on the local filesystem right now.
> 
> It strikes me that the word "bind" implies a two-way binding. But if I
> understand the feature, binding A to B does not automatically create a
> binding in the opposite direction. That is, B has no idea that A has
> been bound to it, right? Perhaps using the word "bind" is causing some
> confusion. Is there a better term that hints at the asymmetrical nature?

If you can think of one, I'd be okay with using it. I don't think that
"bind" is terrible, but I can see your point

> 
> To answer the specific question above, I would have to ask what would
> happen if I did:
> 
>   Bind A to B
>   A commit
> 
> If B's working directory would be updated by the commit, then I would
> expect this:
> 
>   A commit
>   Bind A to B
> 
> to do the same. If the first case doesn't touch B's working directory,
> then neither should the second case.

Yeah, that's what I ended up with. bind/commit/pull all do not update
B's working directory. With the current system, there is no way to go
into B and get it to merge the changes, so it is a little bit broken. In
the future, WorkingTree will keep track of its current revision, which
will help with that.

> 
> In an earlier thread, Rob suggested disallowing binding to a branch that
> has a working tree. That would simplify (eliminate) this case. Arguing
> against that idea, you described your use-case, which is to keep a
> desktop and laptop in sync.

I'd be all for that if we actually had branches without working trees.
:) Since that feature hasn't been implemented, I didn't want to depend
on it.

> 
> It seems to me that you could use a "central" branch that has no working
> directory as a go-between, or "hub". Desktop working branch would be
> bound to the hub, which would have no working directory (and might be
> located on the desktop, or on a LAN server). The laptop working branch
> would be bound to the hub, except when working offline.
> 
> I have never worked like that, but it seems like a plausible solution. I
> just thought I would throw it out there to see if it has any appeal. It
> mirrors the pattern that would be needed by three developers working on
> a single project in a centralized mode.
> 
> Kevin
> 

Yes, it has appeal, since it is actually my personal use case. Since I
have a server, and I am mostly wanting to keep in sync between my
desktop and my laptop. Since we can't update a working directory over
anything but the local transport you pretty much have to go through the
'remote working tree isn't updated'.

For now, I use my rsync plugin which gives rpush and rpull, which lets
me keep working directories up-to-date.
Eventually I would like to switch to just using core bzr features. Right
now, though, pull can be very expensive if there are a lot of revisions
(it has to reweave all of them). So it probably won't be until knits
land that I switch.

John
=:->

-------------- 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/20051231/158d5bc2/attachment.pgp 


More information about the bazaar mailing list