~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to errors.py

Another disk-format bump.

Move the labels/sha1 information into a pre-header. This also makes it
easier to decide to enable/disable the headers, as we can support
both with the same deserialising code (at least until we remove
the extra info from the indexes.)

This also makes a fulltext record stream start with 'f' and a delta
record stream start with 'd', which makes them more self describing.
The next step would probably be to write the base128 length of the
encoded bytes, which would make them fully independent, though
you wouldn't know what content they refer to.

This also brings in an update to .compress() which allows us to
see that we overflowed our group, roll back and start a new one.
This seems to give better compression in a 'more stable' manner.
Still open to tweaking, though.

Also introduce the 'gcc-chk255-big' which uses 64k leaf pages
rather than 4k leaf pages. Initial results show smaller compressed
size at a small (10%) increase in uncompressed size. Also shows
a full level decrease in the tree depth.

No-labels decreases the inv size approx 300kB, and big-page decreases
the inv size another 300kB, not to mention the 116k decrease in the
.cix index, just from not having the extra pages.

Having both no-labels and big inv pages brings a total drop of
11023k down to 9847k for the repo (1176kB savings, or 10% overall).

For now, leave the default with labels, but consider changing it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
"""Error objects for compression functions."""
19
19
 
20
20
from bzrlib.errors import BzrError
 
21
 
 
22
 
 
23
class InvalidGroupCompressBlock(BzrError):
 
24
    """Raised when a block has problems."""
 
25
 
 
26
    _fmt = "Invalid Group Compress Block: %(msg)s"
 
27
 
 
28
    def __init__(self, msg):
 
29
        self.msg = msg