From 34a1d857659b5aa0456a33a603f12060f45704ab Mon Sep 17 00:00:00 2001 From: Jochen Schmitt Date: Tue, 21 Sep 2010 21:20:13 +0200 Subject: Implementing a retire command --- src/fedpkg.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/fedpkg.py') diff --git a/src/fedpkg.py b/src/fedpkg.py index 20dc774..5f3219e 100755 --- a/src/fedpkg.py +++ b/src/fedpkg.py @@ -630,6 +630,15 @@ def push(args): log.error('Could not push: %s' % e) sys.exit(1) +def retire(args): + try: + pyfedpkg.retire(args.path, args.msg) + except pyfedpkg.FedpkgError, e: + log.error('Could not retire package: %s' % e) + sys.exit(1) + if args.push: + push() + def scratchbuild(args): # A scratch build is just a build with --scratch args.scratch = True @@ -1081,6 +1090,18 @@ packages will be built sequentially. help = 'Push changes to remote repository') parser_push.set_defaults(command = push) + # retire stuff + parser_retire = subparsers.add_parser('retire', + help = 'Retire a package') + parser_retire.add_argument('-p', '--push', + default = False, + action = 'store_true', + help = 'Push changes to remote repository') + parser_retire.add_argument('msg', + nargs = '?', + help = 'Message for retiring the package') + parser_retire.set_defaults(command = retire) + # scratch build parser_scratchbuild = subparsers.add_parser('scratch-build', help = 'Request scratch build', -- cgit