summaryrefslogtreecommitdiffstats
path: root/subcmds/upload.py
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds/upload.py')
-rw-r--r--subcmds/upload.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py
index cf3c8a9f..3dd9fd25 100644
--- a/subcmds/upload.py
+++ b/subcmds/upload.py
@@ -23,6 +23,7 @@ from command import InteractiveCommand
23from editor import Editor 23from editor import Editor
24from error import HookError, UploadError 24from error import HookError, UploadError
25from git_command import GitCommand 25from git_command import GitCommand
26from git_refs import R_HEADS
26from project import RepoHook 27from project import RepoHook
27 28
28from pyversion import is_python3 29from pyversion import is_python3
@@ -462,7 +463,10 @@ Gerrit Code Review: https://www.gerritcodereview.com/
462 # Make sure our local branch is not setup to track a different remote branch 463 # Make sure our local branch is not setup to track a different remote branch
463 merge_branch = self._GetMergeBranch(branch.project) 464 merge_branch = self._GetMergeBranch(branch.project)
464 if destination: 465 if destination:
465 full_dest = 'refs/heads/%s' % destination 466 full_dest = destination
467 if not full_dest.startswith(R_HEADS):
468 full_dest = R_HEADS + full_dest
469
466 if not opt.dest_branch and merge_branch and merge_branch != full_dest: 470 if not opt.dest_branch and merge_branch and merge_branch != full_dest:
467 print('merge branch %s does not match destination branch %s' 471 print('merge branch %s does not match destination branch %s'
468 % (merge_branch, full_dest)) 472 % (merge_branch, full_dest))