diff options
author | 2011-03-22 13:51:52 +0100 | |
---|---|---|
committer | 2011-03-22 13:57:09 +0100 | |
commit | a99d12a106072607e547216cd573f7b356ed189f (patch) | |
tree | 3a8761de294e7a71e804421240c06443d135393b /scripts | |
parent | removed --skip-auth from 'bugz' call. (diff) | |
download | tatt-a99d12a106072607e547216cd573f7b356ed189f.tar.gz tatt-a99d12a106072607e547216cd573f7b356ed189f.tar.bz2 tatt-a99d12a106072607e547216cd573f7b356ed189f.zip |
Adding options to resolve and close bugs with tatt.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/tatt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/scripts/tatt b/scripts/tatt index 22e73bb..d2868ee 100755 --- a/scripts/tatt +++ b/scripts/tatt @@ -72,6 +72,20 @@ parser.add_option("-s", "--success", help="Comment that the program was successfully tested", dest="succbugnum", action="store") +parser.add_option("-r", "--resolve", + help="Resolve the given bugnumber, needs a message", + dest="resolvenum", + action="store") +parser.add_option("-c", "--close", + help="Resolve the given bugnumber with closing it, needs to be combined with -r", + dest="close", + action="store_true") +parser.add_option("-m", "--message", + help="Message for bug resolution.", + dest="resolvemessage", + action="store") + + (options,args) = parser.parse_args() @@ -167,6 +181,25 @@ if not packs==None: writeCommit(jobname, options.bugnum, packs, config) exit (0) +# Code for resolving bugs (-r and -m) +##################################### +if options.resolvenum: + if not options.resolvemessage: + print("Please call with a message per -m") + exit (1) + print("Resolving bug number " + options.resolvenum) + calllist = ['bugz', 'modify', options.resolvenum, '-c', config['resolvemessage'], '--remove-cc', config['arch']+"@gentoo.org"] + if options.close: + calllist = callist + ['--fixed'] + retcode = call(calllist) + if retcode == 0: + print("Success!"); + exit (0) + else: + print("Failure accessing bugzilla.") + exit(1) + + ## If we arrive here then a package atom should be given try: pack = gP(args[0]) |