Rev 3655: Document the new form of _nodes and remove an unnecessary cast. in http://bzr.arbash-meinel.com/branches/bzr/1.7-dev/index_builder_cleanup

John Arbash Meinel john at arbash-meinel.com
Thu Aug 28 21:16:44 BST 2008


At http://bzr.arbash-meinel.com/branches/bzr/1.7-dev/index_builder_cleanup

------------------------------------------------------------
revno: 3655
revision-id: john at arbash-meinel.com-20080828201644-itfv9mmesr50lncd
parent: john at arbash-meinel.com-20080828201331-dqffxf54l2heokll
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: index_builder_cleanup
timestamp: Thu 2008-08-28 15:16:44 -0500
message:
  Document the new form of _nodes and remove an unnecessary cast.
-------------- next part --------------
=== modified file 'bzrlib/btree_index.py'
--- a/bzrlib/btree_index.py	2008-08-28 20:13:31 +0000
+++ b/bzrlib/btree_index.py	2008-08-28 20:16:44 +0000
@@ -136,6 +136,8 @@
             key_elements=key_elements)
         self._spill_at = spill_at
         self._backing_indices = []
+        # A map of {key: (node_refs, value)}
+        self._nodes = {}
         # Indicate it hasn't been built yet
         self._nodes_by_key = None
 
@@ -157,7 +159,7 @@
         node_refs, _ = self._check_key_ref_value(key, references, value)
         if key in self._nodes:
             raise errors.BadIndexDuplicateKey(key, self)
-        self._nodes[key] = (tuple(node_refs), value)
+        self._nodes[key] = (node_refs, value)
         self._keys.add(key)
         if self._nodes_by_key is not None and self._key_length > 1:
             self._update_nodes_by_key(key, value, node_refs)



More information about the bazaar-commits mailing list