Mercurial > treepkg
view reportstatus.py @ 47:2802be410156
add config options pbuilderrc and use it when calling pbuilder
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Mon, 02 Apr 2007 20:46:51 +0200 |
parents | 7c55f3879c4d |
children | 0cdda44240a6 |
line wrap: on
line source
#! /usr/bin/python2.4 # Copyright (C) 2007 by Intevation GmbH # Authors: # Bernhard Herzog <bh@intevation.de> # # This program is free software under the GPL (>=v2) # Read the file COPYING coming with the software for details. """Reports the current status of the tree packager""" import os from optparse import OptionParser from treepkg.packager import create_package_line, PackagerGroup from treepkg.readconfig import read_config def parse_commandline(): parser = OptionParser() parser.set_defaults(config_file=os.path.join(os.path.dirname(__file__), "treepkg.cfg")) parser.add_option("--config-file") return parser.parse_args() def main(): options, args = parse_commandline() treepkg_opts, packager_opts = read_config(options.config_file) group = PackagerGroup([create_package_line(**opts) for opts in packager_opts], **treepkg_opts) for line in group.get_package_lines(): for revision in line.get_revisions(): print line.name, revision.revision, revision.status.status print " start:", revision.status.start print " stop:", revision.status.stop main()