summaryrefslogtreecommitdiffstats
path: root/src/fedpkg.py
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-07-06 16:28:34 -0700
committerJesse Keating <jkeating@redhat.com>2010-07-06 16:28:34 -0700
commitf0f4d9c64e3d23c3e1252e508df4c882e8716980 (patch)
treebaf0be31609528ad5daa0ee24a6c9dad011afb08 /src/fedpkg.py
parent14cbfc425f114dc376c0512c59d816595d0dfb4e (diff)
downloadfedora-packager-f0f4d9c64e3d23c3e1252e508df4c882e8716980.zip
fedora-packager-f0f4d9c64e3d23c3e1252e508df4c882e8716980.tar.gz
fedora-packager-f0f4d9c64e3d23c3e1252e508df4c882e8716980.tar.xz
Add the upload target
This is like new-sources, only it doesn't replace existing sources.
Diffstat (limited to 'src/fedpkg.py')
-rwxr-xr-xsrc/fedpkg.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/fedpkg.py b/src/fedpkg.py
index 2c8acac..8452a4d 100755
--- a/src/fedpkg.py
+++ b/src/fedpkg.py
@@ -533,7 +533,7 @@ def new(args):
def new_sources(args):
try:
mymodule = pyfedpkg.PackageModule(args.path)
- mymodule.upload(args.files, replace=True)
+ mymodule.upload(args.files, replace=args.replace)
except pyfedpkg.FedpkgError, e:
log.error('Could not upload new sources: %s' % e)
sys.exit(1)
@@ -807,7 +807,7 @@ packages will be built sequentially.
parser_newsources = subparsers.add_parser('new-sources',
help = 'Upload new source files')
parser_newsources.add_argument('files', nargs = '+')
- parser_newsources.set_defaults(command = new_sources)
+ parser_newsources.set_defaults(command = new_sources, replace = True)
# patch
parser_patch = subparsers.add_parser('patch',
@@ -869,6 +869,12 @@ packages will be built sequentially.
help = 'Submit last build as an update')
parser_update.set_defaults(command = update)
+ # upload target takes one or more files as input
+ parser_upload = subparsers.add_parser('upload',
+ help = 'Upload source files')
+ parser_upload.add_argument('files', nargs = '+')
+ parser_upload.set_defaults(command = new_sources, replace = False)
+
# Get version and release
parser_verrel = subparsers.add_parser('verrel',
help = 'Print the'