bh@99: #! /usr/bin/python2.4 bh@241: # Copyright (C) 2008, 2009 by Intevation GmbH bh@99: # Authors: bh@99: # Bernhard Herzog bh@99: # bh@99: # This program is free software under the GPL (>=v2) bh@99: # Read the file COPYING coming with the software for details. bh@99: bh@99: """List tracks and revisions where notifications are pending""" bh@99: bh@99: import treepkgcmd bh@99: from treepkg.options import create_parser bh@99: from treepkg.report import get_packager_group bh@99: bh@99: def parse_commandline(): bh@99: return create_parser().parse_args() bh@99: bh@99: def list_notifications(config_file): bh@99: group = get_packager_group(config_file) bh@99: for track in group.get_package_tracks(): bh@99: for revision in track.get_revisions(): bh@99: if revision.status.notification_mail.name == "notification_pending": bh@241: print "%s %s %d %d" % (revision.status.status.name, bh@241: track.name, revision.revision, bh@241: revision.rules_revision) bh@99: revision.status.notification_sent() bh@99: bh@99: bh@99: def main(): bh@99: options, args = parse_commandline() bh@99: list_notifications(options.config_file) bh@99: bh@99: main()