diff MoinMoin/items/__init__.py @ 111:d7eb7bf188ed

simplify revision timestamp handling - just store it into metadata Back when the storage api was implemented, timestamp was implemented as a property. I can't remember why this was done, but I assume it was to do backend-specific optimization to quickly access revision timestamp without accessing metadata. As we'll have an index for most important metadata and we likely have to open metadata anyway, MTIME is now just a metadata entry like all the others, not specialcased any more. Like the revision data hash, MTIME is also automatically stored into the revision's metadata when committing it. This simplifies the code quite a bit and makes it more generic.
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 12 Mar 2011 23:33:46 +0100
parents e4c332436733
children e90768ec963c
line wrap: on
line diff
--- a/MoinMoin/items/__init__.py	Sat Mar 12 16:31:43 2011 +0100
+++ b/MoinMoin/items/__init__.py	Sat Mar 12 23:33:46 2011 +0100
@@ -51,7 +51,7 @@
 from MoinMoin.util.send_file import send_file
 from MoinMoin.storage.error import NoSuchItemError, NoSuchRevisionError, AccessDeniedError, \
                                    StorageError
-from MoinMoin.config import UUID, NAME, NAME_OLD, REVERTED_TO, ACL, \
+from MoinMoin.config import UUID, NAME, NAME_OLD, MTIME, REVERTED_TO, ACL, \
                             IS_SYSITEM, SYSITEM_VERSION,  USERGROUP, SOMEDICT, \
                             MIMETYPE, SIZE, LANGUAGE, ITEMLINKS, ITEMTRANSCLUSIONS, \
                             TAGS, ACTION, ADDRESS, HOSTNAME, USERID, EXTRA, COMMENT, \
@@ -283,6 +283,7 @@
                      HASH_ALGORITHM,
                      SIZE,
                      COMMENT,
+                     MTIME,
                      ACTION,
                      ADDRESS, HOSTNAME, USERID,
                     ]