[MERGE] Fix InterBranch.pull tests.

Jelmer Vernooij jelmer at samba.org
Tue Mar 31 00:00:24 BST 2009


Robert Collins wrote:
> On Tue, 2009-03-31 at 00:18 +0200, Jelmer Vernooij wrote:
>   
>>> RemoteBranch is a proxy for branches held elsewhere. It can
>>>       
>> represent
>>     
>>> git or hg or svn branches too, if the plugins are on both systems;
>>>       
>> and
>>     
>>> for those cases you would still want to avoid asking for the source
>>> branch revno.
>>>   
>>>       
>> I agree this would be nice too, but I think that should be independent
>> of this patch.
>>     
>
> Its really an either-or. If spiv or I come back and rework pull to do
> this, to retain the benefits of the inter multimethod for these cases,
> the multi method needs to be hidden on more precise methods than the top
> level pull.
>   
I think that's bearable; we already have a
InterBranch.update_revisions() function at the moment that does the
majority of work for InterBranch.pull() at the moment; we can add more
utility functions on InterBranch that can be shared by various
InterBranch implementations or allow overriding by the implementations.
> Still, its up to you, I'm not against this, I just think that assembling
> it like this will overall cause issues for bzr-svn.
I think we'll end up with some special casing anyway; we can start with
a custom InterBranch.pull() now, that will provide a significant
performance improvement for bzr-svn users (80s -> 4s for a 36k svn
repo). In the longer term, we can make GenericInterBranch.pull() use
more granular smaller function on InterBranch that can then be
overridden where necessary so that it no longer needs to override
InterBranch.pull() itself.

Another thing that InterBranch.pull() would allow is e.g.
short-circuiting the pull from a remote git branch into a local git
branch and letting dulwich handle the pull completely rather than
mapping back and forth in the bzr API.

Cheers,

Jelmer



More information about the bazaar mailing list