[MERGE] journalled inventory serialiser

Robert Collins robertc at robertcollins.net
Mon Jan 7 23:00:30 GMT 2008


This patch adds a journalled inventory serialiser class.

It is correct AFAICT, and has chained sha validation for the whole
chain. Using this cheaply hooked up to a repository I have 2 failing
tests, neither of which appear to be related to the serialiser, but
rather to the upgrade code not doing the right thing when upgrading to
my quick-hack format (and thats a general case of fetch, so on my plate
already).

I've used a lot of errors.BzrError in this patch; this is deliberate as
I felt that most of the cases I was adding errors for are not worth the
overhead of a manual error class. There is one that is likely worth it
(and I've noted that in the source; I'm happy to add that if whomever
reviews this would like that).

The goal of this inventory serialiser work I'm doing is to:
 - move the delta logic for inventories from texts to inventory entries.
 - enable direct emitting of commit deltas avoiding large text diffs
   during commit
 - be a stepping stone in the path of improving the general class of
   'operations between historical versions'

The first as the most impact and consequences on other parts of the
code, and once done should provide the basis for doing rapid evolution
of inventory representations - e.g. adding a split-by-dir or
split-by-count or whatever to the mix.

Performance wise, well its not optimised at all at this point, but in my
test format (not in this patch) its no slower on mozilla trees at
initial or incremental commit than xml are in pure python; in fact its
drops initial commit (using the same bzr tree) from 1m35 to 1m28.
Compared to using the C extensions though it is slightly slower - on an
unchanged tree its 17 seconds vs 12 for the C extensions. Given that
we're comparing a C diff with a python one (to make an inventory delta),
I think that this is expected.

-Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzr-mail-AdEE69.patch
Type: text/x-patch
Size: 141893 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080108/eee1fb1c/attachment-0001.bin 
-------------- 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/20080108/eee1fb1c/attachment-0001.pgp 


More information about the bazaar mailing list