# HG changeset patch # User Paul Boddie # Date 1366377408 -7200 # Node ID 20debfa748c8ab3f4f5e58e8a518186cd530373c # Parent 99b3f4138cc2521d09bfbb2f5f81be8e45eafc4f Reverted the change to using path tuples in item store initialisation. Added a last-modified time method to item directory stores. diff -r 99b3f4138cc2 -r 20debfa748c8 ItemSupport.py --- a/ItemSupport.py Sun Mar 10 01:16:50 2013 +0100 +++ b/ItemSupport.py Fri Apr 19 15:16:48 2013 +0200 @@ -25,6 +25,12 @@ self.writelock = lock.WriteLock(lock_dir) self.readlock = lock.ReadLock(lock_dir) + def mtime(self): + + "Return the last modified time of the item store directory." + + return os.path.getmtime(self.path) + def get_next(self): "Return the next item number." diff -r 99b3f4138cc2 -r 20debfa748c8 MoinSupport.py --- a/MoinSupport.py Sun Mar 10 01:16:50 2013 +0100 +++ b/MoinSupport.py Fri Apr 19 15:16:48 2013 +0200 @@ -949,11 +949,13 @@ "A page-specific item store." - def __init__(self, page, item_dir=("items",), lock_dir=("item_locks",)): + def __init__(self, page, item_dir="items", lock_dir="item_locks"): "Initialise an item store for the given 'page'." - ItemDirectoryStore.__init__(self, page.getPagePath(*item_dir), page.getPagePath(*lock_dir)) + item_dir_path = tuple(item_dir.split("/")) + lock_dir_path = tuple(lock_dir.split("/")) + ItemDirectoryStore.__init__(self, page.getPagePath(*item_dir_path), page.getPagePath(*lock_dir_path)) self.page = page def can_write(self): diff -r 99b3f4138cc2 -r 20debfa748c8 README.txt --- a/README.txt Sun Mar 10 01:16:50 2013 +0100 +++ b/README.txt Fri Apr 19 15:16:48 2013 +0200 @@ -69,8 +69,6 @@ * Added macro argument parsing from MoinForms and a function to find parsers by content type. - * Changed the item storage API to use path tuples instead of strings when - specifying directories. * Introduced support for reverse iteration over stored items. New in MoinSupport 0.2 (Changes since MoinSupport 0.1)