summaryrefslogtreecommitdiffstats
path: root/subcmds/upload.py
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds/upload.py')
-rw-r--r--subcmds/upload.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py
index 53118f6b..07bd4d81 100644
--- a/subcmds/upload.py
+++ b/subcmds/upload.py
@@ -123,6 +123,9 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
123 p.add_option('--br', 123 p.add_option('--br',
124 type='string', action='store', dest='branch', 124 type='string', action='store', dest='branch',
125 help='Branch to upload.') 125 help='Branch to upload.')
126 p.add_option('--cbr', '--current-branch',
127 dest='current_branch', action='store_true',
128 help='Upload current git branch.')
126 129
127 # Options relating to upload hook. Note that verify and no-verify are NOT 130 # Options relating to upload hook. Note that verify and no-verify are NOT
128 # opposites of each other, which is why they store to different locations. 131 # opposites of each other, which is why they store to different locations.
@@ -351,7 +354,11 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
351 branch = opt.branch 354 branch = opt.branch
352 355
353 for project in project_list: 356 for project in project_list:
354 avail = project.GetUploadableBranches(branch) 357 if opt.current_branch:
358 cbr = project.CurrentBranch
359 avail = [project.GetUploadableBranch(cbr)] if cbr else None
360 else:
361 avail = project.GetUploadableBranches(branch)
355 if avail: 362 if avail:
356 pending.append((project, avail)) 363 pending.append((project, avail))
357 364