bh@99: #! /usr/bin/python2.4 bh@99: # Copyright (C) 2008 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@99: print "%s %s %d" % (revision.status.status.name, bh@99: track.name, revision.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()