Rev 3774: Use the new LRUCache.keys() member rather than peeking behind the scenes. in http://bzr.arbash-meinel.com/branches/bzr/1.8-dev/btree_buffer

John Arbash Meinel john at arbash-meinel.com
Tue Oct 14 21:20:12 BST 2008


At http://bzr.arbash-meinel.com/branches/bzr/1.8-dev/btree_buffer

------------------------------------------------------------
revno: 3774
revision-id: john at arbash-meinel.com-20081014201953-gmbxn75fjj8vcie2
parent: john at arbash-meinel.com-20081014201906-5rtgq3yvzent0gwe
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: btree_buffer
timestamp: Tue 2008-10-14 15:19:53 -0500
message:
  Use the new LRUCache.keys() member rather than peeking behind the scenes.
-------------- next part --------------
=== modified file 'bzrlib/btree_index.py'
--- a/bzrlib/btree_index.py	2008-10-14 19:31:34 +0000
+++ b/bzrlib/btree_index.py	2008-10-14 20:19:53 +0000
@@ -688,9 +688,8 @@
 
     def _get_cached_nodes(self):
         """Determine what nodes we already have cached."""
-        # XXX: Update the LRUCache interface to have a .keys() attribute
-        cached_nodes = set(self._internal_node_cache._cache.keys())
-        cached_nodes.update(self._leaf_node_cache._cache.keys())
+        cached_nodes = set(self._internal_node_cache.keys())
+        cached_nodes.update(self._leaf_node_cache.keys())
         if self._root_node is not None:
             cached_nodes.add(0)
         return cached_nodes



More information about the bazaar-commits mailing list