diff options
Diffstat (limited to 'subcmds')
| -rw-r--r-- | subcmds/upload.py | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py index 5b8c1a20..8039a1cd 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py | |||
| @@ -218,9 +218,14 @@ Gerrit Code Review: https://www.gerritcodereview.com/ | |||
| 218 | def _Options(self, p): | 218 | def _Options(self, p): |
| 219 | p.add_option( | 219 | p.add_option( |
| 220 | "-t", | 220 | "-t", |
| 221 | "--topic-branch", | ||
| 221 | dest="auto_topic", | 222 | dest="auto_topic", |
| 222 | action="store_true", | 223 | action="store_true", |
| 223 | help="send local branch name to Gerrit Code Review", | 224 | help="set the topic to the local branch name", |
| 225 | ) | ||
| 226 | p.add_option( | ||
| 227 | "--topic", | ||
| 228 | help="set topic for the change", | ||
| 224 | ) | 229 | ) |
| 225 | p.add_option( | 230 | p.add_option( |
| 226 | "--hashtag", | 231 | "--hashtag", |
| @@ -551,9 +556,12 @@ Gerrit Code Review: https://www.gerritcodereview.com/ | |||
| 551 | 556 | ||
| 552 | # Check if topic branches should be sent to the server during | 557 | # Check if topic branches should be sent to the server during |
| 553 | # upload. | 558 | # upload. |
| 554 | if opt.auto_topic is not True: | 559 | if opt.topic is None: |
| 555 | key = "review.%s.uploadtopic" % branch.project.remote.review | 560 | if opt.auto_topic is not True: |
| 556 | opt.auto_topic = branch.project.config.GetBoolean(key) | 561 | key = "review.%s.uploadtopic" % branch.project.remote.review |
| 562 | opt.auto_topic = branch.project.config.GetBoolean(key) | ||
| 563 | if opt.auto_topic: | ||
| 564 | opt.topic = branch.name | ||
| 557 | 565 | ||
| 558 | def _ExpandCommaList(value): | 566 | def _ExpandCommaList(value): |
| 559 | """Split |value| up into comma delimited entries.""" | 567 | """Split |value| up into comma delimited entries.""" |
| @@ -620,7 +628,7 @@ Gerrit Code Review: https://www.gerritcodereview.com/ | |||
| 620 | branch.UploadForReview( | 628 | branch.UploadForReview( |
| 621 | people, | 629 | people, |
| 622 | dryrun=opt.dryrun, | 630 | dryrun=opt.dryrun, |
| 623 | auto_topic=opt.auto_topic, | 631 | topic=opt.topic, |
| 624 | hashtags=hashtags, | 632 | hashtags=hashtags, |
| 625 | labels=labels, | 633 | labels=labels, |
| 626 | private=opt.private, | 634 | private=opt.private, |
