[Treepkg-commits] r71 - trunk/treepkg
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jun 5 13:05:55 CEST 2008
Author: bh
Date: 2008-06-05 13:05:55 +0200 (Thu, 05 Jun 2008)
New Revision: 71
Modified:
trunk/treepkg/report.py
Log:
new report type: sorted by start date instead of revision number. This
is more useful usually, especially if different tracks come from
different SVN repositories.
Modified: trunk/treepkg/report.py
===================================================================
--- trunk/treepkg/report.py 2008-06-05 10:36:10 UTC (rev 70)
+++ trunk/treepkg/report.py 2008-06-05 11:05:55 UTC (rev 71)
@@ -93,6 +93,31 @@
revisions.reverse()
return revisions
+ def sorted_by_startdate(self):
+ revisions = []
+ for column, track in enumerate(self.tracks):
+ for revision in track.get_revisions():
+ revisions.append((revision.status.start,
+ struct(revno=revision.revision,
+ revision=revision,
+ log_files =
+ [(title, os.path.basename(filename))
+ for title, filename
+ in revision.list_log_files()],
+ column=column,
+ name=track.name,
+ new_date = None,
+ status=prepare_status(revision.status))))
+ revisions.sort()
+ revisions.reverse()
+
+ last_date = None
+ for start, rev in revisions:
+ if last_date != start.date():
+ last_date = start.date()
+ rev.new_date = str(last_date)
+ return revisions
+
def prepare_report(group):
return struct(revisions=Revisions(group.get_package_tracks()),
date=format_time(datetime.datetime.utcnow()))
More information about the Treepkg-commits
mailing list