summaryrefslogtreecommitdiffstats
path: root/subcmds
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds')
-rw-r--r--subcmds/upload.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py
index 6344ee31..9b77b0ee 100644
--- a/subcmds/upload.py
+++ b/subcmds/upload.py
@@ -603,19 +603,22 @@ Gerrit Code Review: https://www.gerritcodereview.com/
603 full_dest = destination 603 full_dest = destination
604 if not full_dest.startswith(R_HEADS): 604 if not full_dest.startswith(R_HEADS):
605 full_dest = R_HEADS + full_dest 605 full_dest = R_HEADS + full_dest
606 full_revision = branch.project.revisionExpr
607 if not full_revision.startswith(R_HEADS):
608 full_revision = R_HEADS + full_revision
606 609
607 # If the merge branch of the local branch is different from 610 # If the merge branch of the local branch is different from
608 # the project's revision AND destination, this might not be 611 # the project's revision AND destination, this might not be
609 # intentional. 612 # intentional.
610 if ( 613 if (
611 merge_branch 614 merge_branch
612 and merge_branch != branch.project.revisionExpr 615 and merge_branch != full_revision
613 and merge_branch != full_dest 616 and merge_branch != full_dest
614 ): 617 ):
615 print( 618 print(
616 f"For local branch {branch.name}: merge branch " 619 f"For local branch {branch.name}: merge branch "
617 f"{merge_branch} does not match destination branch " 620 f"{merge_branch} does not match destination branch "
618 f"{destination}" 621 f"{destination} and revision {branch.project.revisionExpr}"
619 ) 622 )
620 print("skipping upload.") 623 print("skipping upload.")
621 print( 624 print(