Fancy branches versus Transports

Robert Collins robertc at robertcollins.net
Fri Sep 16 15:50:30 BST 2005


On Fri, 2005-09-16 at 10:35 -0400, John A Meinel wrote:
> I wanted to merge my Transport code to the latest bzr.dev, so I pulled
> it in, and I'm looking over Lalo's branch constructor code.
> 
> The issue I want to bring up, is whether we want Branches to be aware of
> the underlying transport, or not.
> The way I was trying to write it, was that we would have a Transport
> layer, which would get rid of RemoteBranch entirely. Transport would
> provide a couple hints to the upper layer, so it would know whether it
> should do caching or not, but generally, the Branch object would be the
> same no matter where the data was coming from.
> 
> I can still do that with Lalo's code, it just looks funny, because I am
> instantiating a "LocalBranch" for remote operations.

So I think in the next release we can fold all the Branch classes
together, and let __init__ work again. The current exception is just
clarity for plugin programmers.

So Branch.open-> resolve transport type, construct a branch
   Branch.open_containing ->resolve transport type, probe for branch
walking up the url, construct a branch
   Branch.initialize -> resolve transport, create branch, construct and
return it.

So for now, work with LocalBranch, and when RemoteBranch is no longer
needed, we can nuke it and Local together.

Rob


-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050917/a2b19fda/attachment.pgp 


More information about the bazaar mailing list