summaryrefslogtreecommitdiffstats
path: root/src/fedpkg.py
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-07-26 13:34:56 -0700
committerJesse Keating <jkeating@redhat.com>2010-07-26 13:34:56 -0700
commit752b39b5b5803ef9b27e366c82ced9b7669d461c (patch)
tree8883706b756e5f2cf14ce4ac6a75f71c90e3d199 /src/fedpkg.py
parent26b2ed80839c521a6b79fafda008220918ac05b5 (diff)
downloadfedora-packager-752b39b5b5803ef9b27e366c82ced9b7669d461c.zip
fedora-packager-752b39b5b5803ef9b27e366c82ced9b7669d461c.tar.gz
fedora-packager-752b39b5b5803ef9b27e366c82ced9b7669d461c.tar.xz
Impliment pushing. Thanks Jochen@herr-schmitt.de
Diffstat (limited to 'src/fedpkg.py')
-rwxr-xr-xsrc/fedpkg.py16
1 files changed, 14 insertions, 2 deletions
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',