changeset 915:3b9bef437212 storage-ng

global history: remove superfluous bookmark comparison, extract from rev what we need only
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 02 Oct 2011 02:13:35 +0200
parents 7d8785cd04b7
children ac600982e40a
files MoinMoin/apps/frontend/views.py
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Sat Oct 01 22:52:37 2011 +0200
+++ b/MoinMoin/apps/frontend/views.py	Sun Oct 02 02:13:35 2011 +0200
@@ -739,13 +739,11 @@
     # TODO: we need use limit=None to simulate previous implementation's behaviour -
     # it would be better to use search_page (and an appropriate limit, if needed)
     revs = flaskg.storage.search(query, all_revs=True, sortedby=[MTIME], reverse=True, limit=None)
-    history = [dict(rev.meta.iteritems()) for rev in revs]
     item_groups = OrderedDict()
-    for doc in history:
+    for rev in revs:
+        doc = dict([(key, rev.meta.get(key)) for key in [MTIME, REVID, NAME, CONTENTTYPE, ACTION, COMMENT, ]])
         current_item_name = doc[NAME]
-        if bookmark_time and datetime.utcfromtimestamp(doc[MTIME]) <= bookmark_time:
-            break
-        elif current_item_name in item_groups:
+        if current_item_name in item_groups:
             latest_doc = item_groups[current_item_name][0]
             tm_latest = latest_doc[MTIME]
             tm_current = doc[MTIME]