comparison reportstatus.py @ 14:dfd89f81e66c

Add simple status report tool. Still using the old status files
author Bernhard Herzog <bh@intevation.de>
date Fri, 09 Mar 2007 19:02:47 +0100
parents
children 7c55f3879c4d
comparison
equal deleted inserted replaced
13:3e6aa2a7f905 14:dfd89f81e66c
1 #! /usr/bin/python2.4
2 # Copyright (C) 2007 by Intevation GmbH
3 # Authors:
4 # Bernhard Herzog <bh@intevation.de>
5 #
6 # This program is free software under the GPL (>=v2)
7 # Read the file COPYING coming with the software for details.
8
9 """Reports the current status of the tree packager"""
10
11 import os
12 from optparse import OptionParser
13
14 from treepkg.packager import create_package_line, PackagerGroup
15 from treepkg.readconfig import read_config
16
17 def parse_commandline():
18 parser = OptionParser()
19 parser.set_defaults(config_file=os.path.join(os.path.dirname(__file__),
20 "treepkg.cfg"))
21 parser.add_option("--config-file")
22 return parser.parse_args()
23
24 def main():
25 options, args = parse_commandline()
26
27 treepkg_opts, packager_opts = read_config(options.config_file)
28 group = PackagerGroup([create_package_line(**opts)
29 for opts in packager_opts],
30 **treepkg_opts)
31 for line in group.get_package_lines():
32 for revision in line.get_revisions():
33 print line.name, revision.revision, revision.status.get()
34
35 main()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)