commit notes

Robert Collins robertc at robertcollins.net
Fri Jul 6 04:51:54 BST 2007


Ian and I just had a call about commit.

I think here are the key things to bear in mind, and what to aim for.

 * We can't aim for a single low level api for both today and tomorrow
on tree/repository - the difference between knits (must have per file
graph) and a future format with an optional per-file-graph is too big.

 * We can aim for a specific CommitBuilder to be selected by the Tree
and Repository types, so that we can have a single high level API which
drives the commit, but is ignorant of the specific data which we use
today (the full inventory and per-file graphs) vs tomorrow (just the
changed files and no per-file graph).

 * find_previous_heads is really two things at the moment: mapping from
InventoryEntries to last-changed-revision-ids and looking up the
previous_heads based on the per-file graph. The latter portion should be
a method on repository that takes (file_id, set_of_revision_ids).

 * find_previous_heads is integral to the current tree->repository
commit code - it needs to run to remove the amount of data that gets
handled at the top level of the commit inventory generation code. 

 * Refactoring what we have to make it mutable may well show up
undesirable things (e.g. that we use the sha from disk to avoid doing a
diff on knits) but we should take small steps - which may mean interim
apis that allow us to clean things up, and then can become simpler
themselves.

-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/20070706/b997491b/attachment.pgp 


More information about the bazaar mailing list