Przyspieszenie dziaƂania operatora in na vstorage.
authorzuber <marek@stepniowski.com>
Fri, 8 Jan 2010 17:19:40 +0000 (18:19 +0100)
committerzuber <marek@stepniowski.com>
Fri, 8 Jan 2010 17:19:40 +0000 (18:19 +0100)
lib/vstorage.py

index ea8d522..d67e2c1 100644 (file)
@@ -144,7 +144,7 @@ class VersionedStorage(object):
         return urlunquote(name)
 
     def __contains__(self, title):
         return urlunquote(name)
 
     def __contains__(self, title):
-        return title in self.all_pages()
+        return urlquote(title) in self.repo.dirstate
 
     def __iter__(self):
         return self.all_pages()        
 
     def __iter__(self):
         return self.all_pages()