optimising diff (text_id vs sha1, and inventory_dir_id)

Robert Collins robertc at robertcollins.net
Thu Apr 14 12:56:49 BST 2005


Using inode sigs to tune diff gives you a mapping : inode signature ->
prior data about that inode.

Currently we have both text_id and text_sha1 in the prior data about the
inode. When we diff against a different revision, if the sha1 is the
same, then we /probably/ have an unaltered file. If the text_id is the
same and we trust our working copy, then its definately an unaltered
file.

I think that we should use the text_id for diff optimisation and not the
sha1 - making the hash a useful optimisation and not the core data
assists with the ability to upgrade it later when we need to.

Likewise, when we create aggregate sha1s for directories, we should
assign an inventory_dir_id with the same algorithm as the sha1, which
only changes when the dir or some of its children do.

Cheers,
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/20050414/82d3ee14/attachment.pgp 


More information about the bazaar mailing list