~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/index.py

  • Committer: John Arbash Meinel
  • Date: 2009-10-17 00:34:28 UTC
  • mfrom: (4754 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4755.
  • Revision ID: john@arbash-meinel.com-20091017003428-opg71qwkbzr3clko
Merge bzr.dev resolve test conflict.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    debug,
41
41
    errors,
42
42
    )
 
43
from bzrlib.static_tuple import StaticTuple
43
44
 
44
45
_HEADER_READV = (0, 200)
45
46
_OPTION_KEY_ELEMENTS = "key_elements="
102
103
 
103
104
    def _check_key(self, key):
104
105
        """Raise BadIndexKey if key is not a valid key for this index."""
105
 
        if type(key) != tuple:
 
106
        if type(key) not in (tuple, StaticTuple):
106
107
            raise errors.BadIndexKey(key)
107
108
        if self._key_length != len(key):
108
109
            raise errors.BadIndexKey(key)
202
203
                if reference not in self._nodes:
203
204
                    self._check_key(reference)
204
205
                    absent_references.append(reference)
 
206
            # TODO: StaticTuple
205
207
            node_refs.append(tuple(reference_list))
 
208
        # TODO: StaticTuple
206
209
        return tuple(node_refs), absent_references
207
210
 
208
211
    def add_node(self, key, value, references=()):