store: use set instead of dict
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Sun, 17 May 2009 04:16:44 +0200
changeset 8467 9890151a7f30
parent 8466 afb3e504b558
child 8468 b35d11d10646
store: use set instead of dict
mercurial/store.py
--- a/mercurial/store.py	Sun May 17 04:14:15 2009 +0200
+++ b/mercurial/store.py	Sun May 17 04:16:44 2009 +0200
@@ -234,9 +234,9 @@
         self.entries = None
 
     def loadfncache(self):
-        self.entries = {}
+        self.entries = set()
         for f in fncache(self.opener):
-            self.entries[f] = True
+            self.entries.add(f)
 
     def __call__(self, path, mode='r', *args, **kw):
         if mode not in ('r', 'rb') and path.startswith('data/'):
@@ -245,7 +245,7 @@
             if path not in self.entries:
                 self.opener('fncache', 'ab').write(path + '\n')
                 # fncache may contain non-existent files after rollback / strip
-                self.entries[path] = True
+                self.entries.add(path)
         return self.opener(hybridencode(path), mode, *args, **kw)
 
 class fncachestore(basicstore):