[MERGE] Reduce overhead on commit by using knit specific API

Ian Clatworthy ian.clatworthy at internode.on.net
Mon Sep 10 13:26:48 BST 2007


Robert Collins wrote:

bb: tweak

> The check in question is only performed during 'add_lines', not
> add_lines_with_ghosts, so I addressed this by changing CommitBuilder to
> use add_lines_with_ghosts, using a subclass of that to preserve the api
> used by weave repositories when adding texts.

Hmm. If we're calling add_lines_with_ghosts() instead of add_lines() in
order to skip a check, then I think we need a better method name or
another method name: add_lines_no_parent_check() say.

> At the same time I noted that we have a trivial compatibility hunk in
> place in CommitBuilder which only affects subclasses of CommitBuilder
> that require that the root entry *not* be supplied. The only plugins can
> can be affected by this are foreign repository suppliers - bzr-svn,
> bzr-hg etc - which also support commits, and AFAIK that means only
> bzr-svn which subclasses RootCommitBuilder and is unaffected. So I
> cleaned up the compatibility layer too to help keep the code simpler.

The code looks fine. I can't comment on whether changing
RootCommitBuilder semantics like this is acceptable or not. Please be
sure to get sign off from Jelmer and Aaron (say) before merging.

> I think this is safe for 0.91.

I'll leave that to poolie to decide.

Ian C.



More information about the bazaar mailing list