~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/btree_index.py

  • Committer: John Arbash Meinel
  • Date: 2008-08-28 20:16:44 UTC
  • mto: This revision was merged to the branch mainline in revision 3688.
  • Revision ID: john@arbash-meinel.com-20080828201644-itfv9mmesr50lncd
Document the new form of _nodes and remove an unnecessary cast.

Show diffs side-by-side

added added

removed removed

Lines of Context:
136
136
            key_elements=key_elements)
137
137
        self._spill_at = spill_at
138
138
        self._backing_indices = []
 
139
        # A map of {key: (node_refs, value)}
 
140
        self._nodes = {}
139
141
        # Indicate it hasn't been built yet
140
142
        self._nodes_by_key = None
141
143
 
157
159
        node_refs, _ = self._check_key_ref_value(key, references, value)
158
160
        if key in self._nodes:
159
161
            raise errors.BadIndexDuplicateKey(key, self)
160
 
        self._nodes[key] = (tuple(node_refs), value)
 
162
        self._nodes[key] = (node_refs, value)
161
163
        self._keys.add(key)
162
164
        if self._nodes_by_key is not None and self._key_length > 1:
163
165
            self._update_nodes_by_key(key, value, node_refs)