diff options
Diffstat (limited to 'subcmds/upload.py')
| -rw-r--r-- | subcmds/upload.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py index 7d460ddf..7f7585ae 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py | |||
| @@ -349,15 +349,16 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ | |||
| 349 | 349 | ||
| 350 | # Make sure our local branch is not setup to track a different remote branch | 350 | # Make sure our local branch is not setup to track a different remote branch |
| 351 | merge_branch = self._GetMergeBranch(branch.project) | 351 | merge_branch = self._GetMergeBranch(branch.project) |
| 352 | full_dest = 'refs/heads/%s' % destination | 352 | if destination: |
| 353 | if not opt.dest_branch and merge_branch and merge_branch != full_dest: | 353 | full_dest = 'refs/heads/%s' % destination |
| 354 | print('merge branch %s does not match destination branch %s' | 354 | if not opt.dest_branch and merge_branch and merge_branch != full_dest: |
| 355 | % (merge_branch, full_dest)) | 355 | print('merge branch %s does not match destination branch %s' |
| 356 | print('skipping upload.') | 356 | % (merge_branch, full_dest)) |
| 357 | print('Please use `--destination %s` if this is intentional' | 357 | print('skipping upload.') |
| 358 | % destination) | 358 | print('Please use `--destination %s` if this is intentional' |
| 359 | branch.uploaded = False | 359 | % destination) |
| 360 | continue | 360 | branch.uploaded = False |
| 361 | continue | ||
| 361 | 362 | ||
| 362 | branch.UploadForReview(people, auto_topic=opt.auto_topic, draft=opt.draft, dest_branch=destination) | 363 | branch.UploadForReview(people, auto_topic=opt.auto_topic, draft=opt.draft, dest_branch=destination) |
| 363 | branch.uploaded = True | 364 | branch.uploaded = True |
