Comment 2 for bug 374738

Revision history for this message
Andrew Bennetts (spiv) wrote : Re: should stream an inventory delta for xml to chk inventory fetching

So the plan for implementing inventory-deltas during fetch is:

 - define a new record storage_kind, "inventory-delta". get_bytes_as('fulltext') should fail for this record.
 - update _extract_and_insert_inventories in StreamSink to check each record to see if it is an inventory delta, if so:
   - look up the parent inventory in the target
   - apply the delta
   - add_inventory
   - (otherwise, use get_bytes_as('fulltext') as before)
 - update StreamSource to generate deltas rather than fulltexts when going from chk->non-chk, or vice-versa. (Or maybe just cross format in general?)
 - update the network protocol
   - serialise & deserialise inventory-delta records, e.g. update NetworkRecordStream. (bzrlib.inventory_delta already exists and will do most of the heavy lifting)
   - perhaps need new insert_stream and get_stream verbs to gracefully handle backwards compatibility.