~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/chk_map.py

  • Committer: Martin Pool
  • Date: 2010-04-01 04:41:18 UTC
  • mto: This revision was merged to the branch mainline in revision 5128.
  • Revision ID: mbp@sourcefrog.net-20100401044118-shyctqc02ob08ngz
ignore .testrepository

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',)
 
695
    __slots__ = ('_common_serialised_prefix', '_serialise_key')
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
701
702
        if search_key_func is None:
702
703
            self._search_key_func = _search_key_plain
703
704
        else:
887
888
                raise AssertionError('%r must be known' % self._search_prefix)
888
889
            return self._search_prefix, [("", self)]
889
890
 
890
 
    _serialise_key = '\x00'.join
891
 
 
892
891
    def serialise(self, store):
893
892
        """Serialise the LeafNode to store.
894
893