RFC: install_revisions -> install_deltas ?

Robert Collins robertc at robertcollins.net
Wed Oct 15 02:08:20 BST 2008


So, install_revisions is the fallback for most fetch operations,
particularly when different serialisers are in place. Its nearly the
most abstract fetcher we have, because it (largely) operates in terms of
trees.

However it is inherently full tree the way it is defined today.

Currently it sort-of-infers-deltas between the new tree and the target
repository; this is less efficient that inferring deltas from the source
repository (where format specific deltas can accelerate this) and then
supplying a delta to the target repository.

Putting aside the desire I have to consolidate with CommitBuilder,
because CommitBuilder is (today) still full-tree always as well, I'm
wondering about a new API on Repository:

def install_revision_deltas(self, deltas):
    """Install a number of revision deltas into this repository.

    Each delta is fetched incrementally; if the basis revision is not 
    present then the tree object is used directly to obtain the content
    of the new revision being inserted.

    :param deltas: An iterable of (new_revision_object, new_tree_object,
        revision_signature_or_None, basis_revision_id, 
        inventory_delta_against_basis) tuples.
    :return: None
    """

I think this would be substantially faster for repositories which are
able to work in less than full-tree terms; xml inventory repositories
wouldn't benefit a lot (and would probably just delegate to
install_revisions), but a CHK based repository, or things like bzr-git
and bzr-svn would likely benefit a lot.

-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/20081015/c2f70544/attachment-0001.pgp 


More information about the bazaar mailing list