diff options
-rw-r--r-- | subcmds/upload.py | 6 |
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 | |||
23 | from editor import Editor | 23 | from editor import Editor |
24 | from error import HookError, UploadError | 24 | from error import HookError, UploadError |
25 | from git_command import GitCommand | 25 | from git_command import GitCommand |
26 | from git_refs import R_HEADS | ||
26 | from project import RepoHook | 27 | from project import RepoHook |
27 | 28 | ||
28 | from pyversion import is_python3 | 29 | from 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)) |