Mercurial > treepkg
changeset 30:22192fad1f79
report two packages with teh same revision on the same line
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Wed, 14 Mar 2007 21:49:05 +0100 |
parents | efdd39f58a61 |
children | 47d69e5d8ace b1235080e694 |
files | treepkg/report.py |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/treepkg/report.py Wed Mar 14 21:09:22 2007 +0100 +++ b/treepkg/report.py Wed Mar 14 21:49:05 2007 +0100 @@ -76,20 +76,23 @@ cls=status_class(status)) def prepare_report(group): - revisions = [] + revisions = {} columns = [] pkglines = group.get_package_lines() num_columns = len(pkglines) for column, line in enumerate(pkglines): columns.append((column, line.name)) for revision in line.get_revisions(): - row = [None] * num_columns + row = revisions.setdefault(revision.revision, [None] * num_columns) row[column] = struct(revno=revision.revision, revision=revision, column=column, name=line.name, status=prepare_status(revision.status)) - revisions.append((revision.revision, row)) + + # convert the revisions dict into a sorted list of (revno, row) + # pairs + revisions = revisions.items() revisions.sort() revisions.reverse()