~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/chk_map.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-05-20 09:27:48 UTC
  • mfrom: (5241.2.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20100520092748-oa7knubtqio8l2rc
(lifeless) Merge 2.1 into trunk with a number of fixes including pyrex 0.9.9
 support. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
692
692
        the key/value pairs.
693
693
    """
694
694
 
695
 
    __slots__ = ('_common_serialised_prefix', '_serialise_key')
 
695
    __slots__ = ('_common_serialised_prefix',)
696
696
 
697
697
    def __init__(self, search_key_func=None):
698
698
        Node.__init__(self)
699
699
        # All of the keys in this leaf node share this common prefix
700
700
        self._common_serialised_prefix = None
701
 
        self._serialise_key = '\x00'.join
702
701
        if search_key_func is None:
703
702
            self._search_key_func = _search_key_plain
704
703
        else:
888
887
                raise AssertionError('%r must be known' % self._search_prefix)
889
888
            return self._search_prefix, [("", self)]
890
889
 
 
890
    _serialise_key = '\x00'.join
 
891
 
891
892
    def serialise(self, store):
892
893
        """Serialise the LeafNode to store.
893
894
 
1726
1727
 
1727
1728
try:
1728
1729
    from bzrlib._chk_map_pyx import (
 
1730
        _bytes_to_text_key,
1729
1731
        _search_key_16,
1730
1732
        _search_key_255,
1731
1733
        _deserialise_leaf_node,
1734
1736
except ImportError, e:
1735
1737
    osutils.failed_to_load_extension(e)
1736
1738
    from bzrlib._chk_map_py import (
 
1739
        _bytes_to_text_key,
1737
1740
        _search_key_16,
1738
1741
        _search_key_255,
1739
1742
        _deserialise_leaf_node,