~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/chk_map.py

  • Committer: Vincent Ladeuil
  • Date: 2010-02-09 17:29:26 UTC
  • mto: (5029.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5030.
  • Revision ID: v.ladeuil+lp@free.fr-20100209172926-4kgu4aglg29xt3t1
Move UnlistableServer to bzrlib.tests.test_server

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008, 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2008, 2009 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
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