[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.45-102-g4c48ac2

Andreas Beckmann debian at abeckmann.de
Fri Aug 3 08:51:57 UTC 2012


The following commit has been merged in the develop branch:
commit 8e890814aa7fca8cb585696d47698bf97dbed6a2
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Sun Jul 22 13:33:47 2012 +0200

    lib/db: add get_mtime() method
    
    returns most recent modification time of a subdirectory
    
    this will be used to clear a remembered idle state as any log
    modification (submission, deletion, ...) will update the mtime
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/piupartslib/packagesdb.py b/piupartslib/packagesdb.py
index 1b9d8d7..6e4a0e8 100644
--- a/piupartslib/packagesdb.py
+++ b/piupartslib/packagesdb.py
@@ -337,6 +337,9 @@ class PackagesDB:
         logging.info("nothing to recycle")
         return False
 
+    def get_mtime(self):
+        return max([os.path.getmtime(sdir) for sdir in self._all])
+
     def read_packages_file(self, input):
         self._packages_files.append(PackagesFile(input))
         self._packages = None

-- 
piuparts git repository



More information about the Piuparts-commits mailing list