changeset 8480:0e91bcaaa92c

store: create set directly from iterable
author Martin Geisler <mg@lazybytes.net>
date Sun, 17 May 2009 16:56:20 +0200
parents 3e16c0fc2241
children a9dab5a0f85b
files mercurial/store.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/store.py	Sun May 17 16:55:51 2009 +0200
+++ b/mercurial/store.py	Sun May 17 16:56:20 2009 +0200
@@ -234,9 +234,7 @@
         self.entries = None
 
     def loadfncache(self):
-        self.entries = set()
-        for f in fncache(self.opener):
-            self.entries.add(f)
+        self.entries = set(fncache(self.opener))
 
     def __call__(self, path, mode='r', *args, **kw):
         if mode not in ('r', 'rb') and path.startswith('data/'):