~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/index.py

  • Committer: John Arbash Meinel
  • Date: 2009-11-07 00:28:26 UTC
  • mto: This revision was merged to the branch mainline in revision 4842.
  • Revision ID: john@arbash-meinel.com-20091107002826-umvwb3zl0yajo6rc
Use StaticTuple as part of the builder process.

Also use it in the pure python btree parser, mostly for consistency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
189
189
                                This may contain duplicates if the same key is
190
190
                                referenced in multiple lists.
191
191
        """
 
192
        as_st = StaticTuple.from_sequence
192
193
        self._check_key(key)
193
194
        if _newline_null_re.search(value) is not None:
194
195
            raise errors.BadIndexValue(value)
203
204
                if reference not in self._nodes:
204
205
                    self._check_key(reference)
205
206
                    absent_references.append(reference)
206
 
            # TODO: StaticTuple
207
 
            node_refs.append(tuple(reference_list))
208
 
        # TODO: StaticTuple
209
 
        return tuple(node_refs), absent_references
 
207
            node_refs.append(as_st(reference_list))
 
208
        return as_st(node_refs), absent_references
210
209
 
211
210
    def add_node(self, key, value, references=()):
212
211
        """Add a node to the index.