summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--subcmds/upload.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py
index 856c7fb9..ef6d0242 100644
--- a/subcmds/upload.py
+++ b/subcmds/upload.py
@@ -149,6 +149,9 @@ Gerrit Code Review: https://www.gerritcodereview.com/
149 p.add_option('--hashtag', '--ht', 149 p.add_option('--hashtag', '--ht',
150 dest='hashtags', action='append', default=[], 150 dest='hashtags', action='append', default=[],
151 help='Add hashtags (comma delimited) to the review.') 151 help='Add hashtags (comma delimited) to the review.')
152 p.add_option('--hashtag-branch', '--htb',
153 action='store_true',
154 help='Add local branch name as a hashtag.')
152 p.add_option('--re', '--reviewers', 155 p.add_option('--re', '--reviewers',
153 type='string', action='append', dest='reviewers', 156 type='string', action='append', dest='reviewers',
154 help='Request reviews from these people.') 157 help='Request reviews from these people.')
@@ -420,6 +423,8 @@ Gerrit Code Review: https://www.gerritcodereview.com/
420 hashtags = set(_ExpandHashtag(branch.project.config.GetString(key))) 423 hashtags = set(_ExpandHashtag(branch.project.config.GetString(key)))
421 for tag in opt.hashtags: 424 for tag in opt.hashtags:
422 hashtags.update(_ExpandHashtag(tag)) 425 hashtags.update(_ExpandHashtag(tag))
426 if opt.hashtag_branch:
427 hashtags.add(branch.name)
423 428
424 destination = opt.dest_branch or branch.project.dest_branch 429 destination = opt.dest_branch or branch.project.dest_branch
425 430