Rev 4738: And a fix for has_id() in http://bazaar.launchpad.net/~jameinel/bzr/2.1-chk-memory

John Arbash Meinel john at arbash-meinel.com
Thu Oct 8 23:01:46 BST 2009


At http://bazaar.launchpad.net/~jameinel/bzr/2.1-chk-memory

------------------------------------------------------------
revno: 4738
revision-id: john at arbash-meinel.com-20091008220125-4asuwem0koogovq5
parent: john at arbash-meinel.com-20091008215909-d1ukaxat5o9mdl69
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1-chk-memory
timestamp: Thu 2009-10-08 17:01:25 -0500
message:
  And a fix for has_id()
-------------- next part --------------
=== modified file 'bzrlib/inventory.py'
--- a/bzrlib/inventory.py	2009-10-08 21:59:09 +0000
+++ b/bzrlib/inventory.py	2009-10-08 22:01:25 +0000
@@ -2058,7 +2058,8 @@
 
     def has_id(self, file_id):
         # Perhaps have an explicit 'contains' method on CHKMap ?
-        if file_id in self._fileid_to_entry_cache:
+        if (self._fileid_to_entry_cache is not None
+            and file_id in self._fileid_to_entry_cache):
             return True
         return len(list(self.id_to_entry.iteritems([(file_id,)]))) == 1
 



More information about the bazaar-commits mailing list