From afeacb048f4ca0aed300531fcb90da969724f803 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Mon, 1 Mar 2010 21:30:39 +0000 Subject: [PATCH] langstat: Output date of the latest and oldest language update. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24986 a1c6a512-1295-4272-9138-f99709370657 --- rbutil/rbutilqt/langstats.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rbutil/rbutilqt/langstats.py b/rbutil/rbutilqt/langstats.py index bc7e0ee58f..f415237f4f 100755 --- a/rbutil/rbutilqt/langstats.py +++ b/rbutil/rbutilqt/langstats.py @@ -29,6 +29,7 @@ import tempfile import os import shutil from datetime import date +import time langs = { @@ -162,6 +163,8 @@ def main(): client = pysvn.Client() # scan output i = 0 + tslateststamp = 0 + tsoldeststamp = time.time() while i < len(lines): line = lines[i] if re_updating.search(line): @@ -170,6 +173,10 @@ def main(): fileinfo = client.info2(svnserver + langbase + tsfile)[0][1] tsrev = fileinfo.last_changed_rev.number tsdate = date.fromtimestamp(fileinfo.last_changed_date).isoformat() + if fileinfo.last_changed_date > tslateststamp: + tslateststamp = fileinfo.last_changed_date + if fileinfo.last_changed_date < tsoldeststamp: + tsoldeststamp = fileinfo.last_changed_date line = lines[i + 1] if re_generated.search(line): @@ -219,6 +226,8 @@ def main(): if pretty == 1: print delim + print "Last language updated on " + date.fromtimestamp(tslateststamp).isoformat() + print "Oldest language update was " + date.fromtimestamp(tsoldeststamp).isoformat() shutil.rmtree(workfolder)