thomas@78: #! /usr/bin/python2.4 thomas@78: # Copyright (C) 2007 by Intevation GmbH thomas@78: # Authors: thomas@78: # Bernhard Herzog thomas@78: # thomas@78: # This program is free software under the GPL (>=v2) thomas@78: # Read the file COPYING coming with the software for details. thomas@78: thomas@78: """Reports the current status of the tree packager""" thomas@78: thomas@78: import sys thomas@78: import os thomas@78: from optparse import OptionParser thomas@78: thomas@78: import treepkgcmd thomas@78: from treepkg.options import create_parser thomas@78: from treepkg.report import get_packager_group, prepare_report thomas@78: thomas@78: def parse_commandline(): thomas@78: return create_parser().parse_args() thomas@78: thomas@78: thomas@78: def report_text(group): thomas@78: report = prepare_report(group) thomas@78: for revno, row in report.revisions: thomas@78: for col in row: thomas@78: if col: thomas@78: print "%s %s: %s" % (col.name, revno, col.status.desc) thomas@78: if col.status.start: thomas@78: print " Start:", col.status.start thomas@78: print " Stop:", col.status.stop thomas@78: print thomas@78: thomas@78: def main(): thomas@78: options, args = parse_commandline() thomas@78: group = get_packager_group(options.config_file) thomas@78: report_text(group) thomas@78: thomas@78: thomas@78: main()