~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/chk_map.py

  • Committer: Robert Collins
  • Date: 2010-02-27 12:27:33 UTC
  • mto: This revision was merged to the branch mainline in revision 5061.
  • Revision ID: robertc@robertcollins.net-20100227122733-2o3me3fkk3pk36ns
``bzrlib.branchbuilder.BranchBuilder.build_snapshot`` now accepts a
``message_callback`` in the same way that commit does. (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',)
 
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