~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/groupcompress.py

Merge bzr.dev to unify _type_equality_funcs workarounds

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    )
40
40
 
41
41
from bzrlib.repofmt import pack_repo
 
42
from bzrlib.i18n import gettext
42
43
""")
43
44
 
44
45
from bzrlib.btree_index import BTreeBuilder
466
467
                # Grab and cache the raw bytes for this entry
467
468
                # and break the ref-cycle with _manager since we don't need it
468
469
                # anymore
469
 
                self._manager._prepare_for_extract()
 
470
                try:
 
471
                    self._manager._prepare_for_extract()
 
472
                except zlib.error as value:
 
473
                    raise errors.DecompressCorruption("zlib: " + str(value))
470
474
                block = self._manager._block
471
475
                self._bytes = block.extract(self.key, self._start, self._end)
472
476
                # There are code paths that first extract as fulltext, and then
1751
1755
                raise errors.RevisionNotPresent(record.key, self)
1752
1756
            if random_id:
1753
1757
                if record.key in inserted_keys:
1754
 
                    trace.note('Insert claimed random_id=True,'
1755
 
                               ' but then inserted %r two times', record.key)
 
1758
                    trace.note(gettext('Insert claimed random_id=True,'
 
1759
                               ' but then inserted %r two times'), record.key)
1756
1760
                    continue
1757
1761
                inserted_keys.add(record.key)
1758
1762
            if reuse_blocks: