view bin/treepkginfo.py @ 525:e73a4bbc35e7

tag_pkg_parameters depends on scm therefore move this method to the tagdetetors which are scm aware currently bot tag_pkg_parameters (for git and svn) contain hardcoded regular expressions which should be removed in future
author Bjoern Ricks <bricks@intevation.de>
date Mon, 15 Nov 2010 14:34:15 +0000
parents 2d31eea39f70
children
line wrap: on
line source
#! /usr/bin/python
# Copyright (C) 2010 by Intevation GmbH
# Authors:
# Bjoern Ricks <bjoern.ricks@intevation.de>
#
# This program is free software under the GPL (>=v2)
# Read the file COPYING coming with the software for details.

"""Receive the status of a treepkg"""

import treepkgcmd

from treepkg.info import status

from treepkg.options import create_parser

def parse_commandline():
    parser = create_parser()
    parser.set_defaults(newest=-1)
    parser.add_option("--newest", type="int",
                      help=("Number of newest revisions to list."))
    parser.add_option("--only-successful", action="store_true",
                      help=("Show only successful builds"), dest="success")
    parser.add_option("--pretty", action="store_true", help=("Show XML pretty"
                      " output."))
 

    return parser.parse_args()

def main():
    options, args = parse_commandline()

    tpkginfo = status.TreepkgInfo(options.config_file, options.newest,
                                  options.success)

    if options.pretty:
        print tpkginfo.toxml().toprettyxml()
    else:
        print tpkginfo.toxml().toxml()

main()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)