summaryrefslogtreecommitdiffstats
path: root/src/fedpkg.py
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-07-23 17:16:51 -0700
committerJesse Keating <jkeating@redhat.com>2010-07-23 17:16:51 -0700
commit3c83d6b8aa49d37479d0f74bd0263f47667872bd (patch)
treed4c6a313184dc8bb4e39f9cc2773a7a70376ab96 /src/fedpkg.py
parent44f7130126913186caa55b2da1a58debc647fa02 (diff)
downloadfedora-packager-3c83d6b8aa49d37479d0f74bd0263f47667872bd.zip
fedora-packager-3c83d6b8aa49d37479d0f74bd0263f47667872bd.tar.gz
fedora-packager-3c83d6b8aa49d37479d0f74bd0263f47667872bd.tar.xz
Move things to be in alphabetical order.
Diffstat (limited to 'src/fedpkg.py')
-rwxr-xr-xsrc/fedpkg.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/fedpkg.py b/src/fedpkg.py
index db50108..aef6982 100755
--- a/src/fedpkg.py
+++ b/src/fedpkg.py
@@ -266,18 +266,6 @@ def _progress_callback(uploaded, total, piece, time, total_time):
sys.stdout.write("[% -36s] % 4s % 8s % 10s % 14s\r" % ('='*(int(percent_done*36)), percent_done_str, elapsed, data_done, speed))
sys.stdout.flush()
-def switch_branch(args):
- if args.branch:
- try:
- pyfedpkg.switch_branch(args.branch)
- except pyfedpkg.FedpkgError, e:
- log.debug('Unable to switch to another branch: %s' % e)
- else:
- try:
- pyfedpkg.switch_branch(list=1)
- except pyfedpkg.FedpkgError, e:
- log.debug('Unable to list branches: %s' % e)
-
def build(args):
# We may not actually nave an srpm arg if we come directly from the build task
if hasattr(args, 'srpm') and args.srpm and not args.scratch:
@@ -597,6 +585,18 @@ def srpm(args):
log.error('Could not make an srpm: %s' % e)
sys.exit(1)
+def switch_branch(args):
+ if args.branch:
+ try:
+ pyfedpkg.switch_branch(args.branch)
+ except pyfedpkg.FedpkgError, e:
+ log.debug('Unable to switch to another branch: %s' % e)
+ else:
+ try:
+ pyfedpkg.switch_branch(list=1)
+ except pyfedpkg.FedpkgError, e:
+ log.debug('Unable to list branches: %s' % e)
+
def tagrequest(args):
# not implimented
log.warning('Not implimented yet, got %s' % args)
@@ -651,15 +651,6 @@ if __name__ == '__main__':
parser_help = subparsers.add_parser('help', help = 'Show usage')
parser_help.set_defaults(command = usage)
- # switch branches
- parser_switchbranch = subparsers.add_parser('switch-branch',
- help = 'Work with branches')
- parser_switchbranch.add_argument('branch', nargs = '?')
- parser_switchbranch.add_argument('-l', '--list',
- help = 'List both remote-tracking branches and local branches',
- action = 'store_true')
- parser_switchbranch.set_defaults(command = switch_branch, replace = True)
-
# Add a common build parser to be used as a parent
parser_build_common = subparsers.add_parser('build_common',
add_help = False)
@@ -880,6 +871,15 @@ packages will be built sequentially.
help = 'Use md5 checksums (for older rpm hosts)')
parser_srpm.set_defaults(command = srpm)
+ # switch branches
+ parser_switchbranch = subparsers.add_parser('switch-branch',
+ help = 'Work with branches')
+ parser_switchbranch.add_argument('branch', nargs = '?')
+ parser_switchbranch.add_argument('-l', '--list',
+ help = 'List both remote-tracking branches and local branches',
+ action = 'store_true')
+ parser_switchbranch.set_defaults(command = switch_branch, replace = True)
+
# Create a releng tag request
parser_tagrequest = subparsers.add_parser('tag-request',
help = 'Submit last build as a releng tag request')