From 752b39b5b5803ef9b27e366c82ced9b7669d461c Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 26 Jul 2010 13:34:56 -0700 Subject: Impliment pushing. Thanks Jochen@herr-schmitt.de --- src/fedpkg.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/fedpkg.py') diff --git a/src/fedpkg.py b/src/fedpkg.py index f9db3c1..ba36f26 100755 --- a/src/fedpkg.py +++ b/src/fedpkg.py @@ -419,8 +419,7 @@ def commit(args): log.error('Could not commit: %s' % e) sys.exit(1) if args.push: - # do the push command here. - pass + push(args) def compile(args): arch = None @@ -559,6 +558,14 @@ def prep(args): log.error('Could not prep: %s' % e) sys.exit(1) +def push(args): + try: + mymodule = pyfedpkg.PackageModule(args.path) + mymodule.push() + except pyfedpkg.FedpkgError, e: + log.error('Could not push: %s' % e) + sys.exit(1) + def scratchbuild(args): # A scratch build is just a build with --scratch args.scratch = True @@ -855,6 +862,11 @@ packages will be built sequentially. parser_prep.add_argument('--arch', help = 'Prep for a specific arch') parser_prep.set_defaults(command = prep) + # Push stuff + parser_push = subparsers.add_parser('push', + help = 'Push changes to remote repository') + parser_push.set_defaults(command = push) + # scratch build parser_scratchbuild = subparsers.add_parser('scratch-build', help = 'Request scratch build', -- cgit