[RFC] two-phase version add?

Robert Collins robertc at robertcollins.net
Tue Jun 26 05:25:02 BST 2007

On Mon, 2007-06-25 at 11:57 -0400, Aaron Bentley wrote:

> With bundles being in read order, we have to seek.  But the bundles are
> bzip2-compressed, which hampers seeking backwards.  So in order to
> construct a revision tree, we have to stream through the file at least
> twice-- once to get the inventory, and once to get the file diffs.

Is this because you bzip2 the whole pack ?

> I think it would be preferable to implement two-phase version adds, so
> that we could write the revision and inventory at the beginning of the
> bundle, then the files, then activate the inventory, then activate the
> revision.

I think that we should focus on atomically adding all the data rather
than bits at a time - via the repo as a bunch of pack files plan. This
will allow streaming all the data in read order to a final pack file -
we just need to strip out all the already present revisions (if we care
to), and the non-repository data, plus calculate any repository policy
driven information such as per-file graphs, annotations and the like.

I think that this would look something like:
 - generate the new pack, rename into place.
 - generate an index, rename into place.
 - generate cached annotations etc in some related location (e.g. same
basename, but .something).


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/20070626/b7d5ecb2/attachment.pgp 

More information about the bazaar mailing list