things-to-do-in-chk-repository

Aaron Bentley aaron at aaronbentley.com
Tue Nov 11 01:42:42 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> So here are some 'hot' topics in this branch:
>  - write a RevisionTree.iter_changes(RevisionTree) optimiser
>    that picks up on the type of the inventory to fast-path
>    deltas using the CHKInventory guts. (poolie is looking at this)

For RevisionTree-to-RevisionTree, a richer API that included sha1sum
would make a lot of sense.

>  - get 'st -r -2' to do inventory delta composition - that is to do
>    wt.iter_changes(basis_tree) and RevisionTree(-1).iter_changes(
>    RevisionTree(-2)), and combine the results. Combined with the 
>    optimiser for (RT,RT) above this should lead to very fast diffs
>    with deep history (both because we don't need to generate a full 
>    inventory at any point, and because the repository can be optimised
>    too.
> 
> I think the delta composition is an important thing to work on, because
> it will be difficult to tell if the design is successful until that is
> working.

I think the kind of delta composition we need to do is dead simple:
for WT -> BASIS, generate an inventory entry* of each modified file.
For BASIS -> REVISION_TREE, generate an inventory entry of each modified
file.  For file-ids in REVISION_TREE that are missing from WT, copy them
 from BASIS.  For file-ids in WT that are missing from REVISION_TREE,
copy them from BASIS.

Then it should be trivial to generate iter_changes-style ouput from the
WT and REVISION_TREE inventory entries.

* We don't need real inventory entries, but we'll want sha1sum so that
we detect cases where REVISION_TREE and WT have the same content, but
BASIS is different.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkY4xIACgkQ0F+nu1YWqI1y4QCfTNXo0ikAdSK65/DS2zHmQm+I
X3MAn1kFARn62KFr1+rY1fFVcrJCvhaN
=pidy
-----END PGP SIGNATURE-----



More information about the bazaar mailing list