From: zuber Date: Fri, 8 Jan 2010 17:19:40 +0000 (+0100) Subject: Przyspieszenie działania operatora in na vstorage. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/3ed70e460bfde9667995b2e15ef14b8e25e6db15 Przyspieszenie działania operatora in na vstorage. --- diff --git a/lib/vstorage.py b/lib/vstorage.py index ea8d5229..d67e2c10 100644 --- a/lib/vstorage.py +++ b/lib/vstorage.py @@ -144,7 +144,7 @@ class VersionedStorage(object): 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()