Mercurial > hg
changeset 8467:9890151a7f30
store: use set instead of dict
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sun, 17 May 2009 04:16:44 +0200 |
parents | afb3e504b558 |
children | b35d11d10646 |
files | mercurial/store.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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):