# HG changeset patch # User Benoit Boissinot # Date 1242526604 -7200 # Node ID 9890151a7f30b234650989d111f1813c78530e45 # Parent afb3e504b5581f069096f76fc8bda21e86cc3b02 store: use set instead of dict diff -r afb3e504b558 -r 9890151a7f30 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):