/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/chk_map.py

  • Committer: Martin
  • Date: 2010-04-21 20:33:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5183.
  • Revision ID: gzlist@googlemail.com-20100421203310-7cehyh059078wb4t
Make LeafNode._serialise_key a static method on the class rather than the instance

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