[MERGE] Add InterBranch.

Jelmer Vernooij jelmer at samba.org
Wed Feb 11 15:09:29 GMT 2009


The attached patch adds a simple InterBranch object, for which optimisers 
can be registered. 

This is required for some foreign branch implementations, such as git - which 
have no way of inspecting the history on the remote side before fetch (and 
thus of calculating the revno). Some other foreign branch implementations
(Subversion) can be optimized this way, since calculating the last revno 
is O(CN) for them (with N being the number of revisions on mainline and 
C being a relatively high constant), while it can be avoided.

Another thing that should be possible in the future is to add a 
ForeignBranchToBazaarBranch optimiser that is smart about foreign vcs mappings.

I think I need to add tests, but I'm not quite sure what sort of tests. The 
current tests for Branch.update_revisions() should cover all the uses of 
InterBranch in bzrlib.

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-patch
Size: 9220 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090211/57c66b47/attachment-0001.bin 


More information about the bazaar mailing list