[MERGE] Get rid of revision_history() call during copy_content_into.

Andrew Bennetts andrew.bennetts at canonical.com
Fri Nov 14 06:05:25 GMT 2008


Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Andrew Bennetts wrote:
> > This removes a call to revision_history() that was occurring during a
> > copy_content_into.  In particular this was affecting RemoteBranch.  This
> > will penalise BzrBranch5 a little, but it's old enough that we probably
> > don't mind.
> 
> bb:resubmit
> 
> This doesn't make sense to me.  If it's affecting any branches, it's
> affecting RemoteBranch only, because it's optimized for each branch type.

It can affect foreign branches that subclass Branch as well.  I'd rather that
slow, deprecated code was the not the default case.

> Please optimize RemoteBranch instead of pessimizing Branch5.

Ok.  Our inheritance heirarchy is pretty whack here:

  Branch
   |   \______________________
   |                          \
  BzrBranch (format 4)       RemoteBranch
   |
  BzrBranch5
   |
  BzrBranch7
   |
  BzrBranch6

4, 5, 7, 6.

So fixing Branch to default to the modern interfaces, while allowing format 4/5
to use revision-history, and still allowing 6/7 to use the modern facilities, is
a bit ugly.  This patch does that.

We probably want to dramatically restructure this code at some point, but that's
out-of-scope for this patch, unsurprisingly.

This version of the patch also adds a test that shows that RemoteBranch no
longer does a Branch.revision_history RPC.

-Andrew.
  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rev-history.diff
Type: text/x-diff
Size: 14270 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20081114/1154e620/attachment.bin 


More information about the bazaar mailing list