Commit 9eadede7 authored by rmistry's avatar rmistry Committed by Commit bot

Add ability to set topic during "git cl upload"

BUG=chromium:628237

Review-Url: https://codereview.chromium.org/2343363003
parent 7e16cf30
...@@ -2632,6 +2632,11 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase): ...@@ -2632,6 +2632,11 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
if options.private: if options.private:
refspec_opts.append('draft') refspec_opts.append('draft')
if options.topic:
# Documentation on Gerrit topics is here:
# https://gerrit-review.googlesource.com/Documentation/user-upload.html#topic
refspec_opts.append('topic=%s' % options.topic)
refspec_suffix = '' refspec_suffix = ''
if refspec_opts: if refspec_opts:
refspec_suffix = '%' + ','.join(refspec_opts) refspec_suffix = '%' + ','.join(refspec_opts)
...@@ -3932,6 +3937,8 @@ def CMDupload(parser, args): ...@@ -3932,6 +3937,8 @@ def CMDupload(parser, args):
parser.add_option('--no-squash', action='store_true', parser.add_option('--no-squash', action='store_true',
help='Don\'t squash multiple commits into one ' + help='Don\'t squash multiple commits into one ' +
'(Gerrit only)') '(Gerrit only)')
parser.add_option('--topic', default=None,
help='Topic to specify when uploading (Gerrit only)')
parser.add_option('--email', default=None, parser.add_option('--email', default=None,
help='email address to use to connect to Rietveld') help='email address to use to connect to Rietveld')
parser.add_option('--tbr-owners', dest='tbr_owners', action='store_true', parser.add_option('--tbr-owners', dest='tbr_owners', action='store_true',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment