Code review comment for lp:~jameinel/bzr/1.18-bundle-and-stack-393349

Revision history for this message
John A Meinel (jameinel) wrote :

This is a feature fix for bug #393349. It changes the bundle create and insert code to allow bundles to work with --2a format repositories.

The basic change is to make the bundle writer look at repository._serializer.supports_altered_by_hack. If it does support it, then we just read mpdiffs directly from the VF (same as before). If it *doesn't* then it uses serializer.write_inventory_to_string().

In doing so, I discovered that CHKSerializer actually inherits from a non-rich-root XML serializer. However we obviously aren't using those parts in production today (since otherwise it would have broken as observed). Andrew ran into this as well when he was working on the inventory delta code.

Trying to apply one of these bundles with an older bzr will result in a sha1sum mismatch (as it tries to apply the mpdiff directly to the chk format text, which shouldn't apply at all).

There are a couple of serious performance issues (it takes ~1m+ to generate a 500 revision bundle, and 3m+ to insert it, while 'bzr pull' on those revisions takes ~12s.) I'll probably work on some of the obvious ones, but for now I wanted to get the basic functionality reviewed and merged.

« Back to merge proposal