[MERGE-REQ] bzr.newformat

Gustavo Niemeyer gustavo at niemeyer.net
Thu Sep 15 23:18:17 BST 2005


I've checked out the weave branch, and had a general overview
on it.  The new storage scheme looks very promising indeed.
One point I've found a bit dubious though is how the storage
format depends on newlines as an enforced boundary for each
chunk. This would turn the format into something a bit unwieldy
for binary files, becoming impossible, for instance, to have
chunks of fixed sizes.

With that in mind, I propose a small change to the format. The
branch at http://bzr.labix.org/bzr.newformat contains this
change. In the tests I did it won't affect performance,
storage size, nor readability in a significant way, and basically
consists of storing the string size rather than relying on
newlines (this was suggested by Robert Collins; my original
intention was to escape newlines).

The branch also contains a few other adjustments to support
the changes introduced by the new storage format.

More specifically:

- Contains the changes to support the new proposed format.

- For some reason files starting with '__' are not accepted
  by _add_text_to_weave(). I was testing the new code with
  a Python source tree, and this created problems with
  __init__.py. The code preventing this kind of entry was
  just commented out to make tests work.

- Adapted the command.

- Introduced WeaveStore.total_size() to fix info command.

- s/revision_limit/self.revision_limit/

I hope you find it useful.

Gustavo Niemeyer

More information about the bazaar mailing list