diff options
Diffstat (limited to 'subcmds/upload.py')
| -rw-r--r-- | subcmds/upload.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py index bb4390d22..248486979 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py | |||
| @@ -370,6 +370,12 @@ Gerrit Code Review: https://www.gerritcodereview.com/ | |||
| 370 | help="always ask about untracked files in the working copy", | 370 | help="always ask about untracked files in the working copy", |
| 371 | ) | 371 | ) |
| 372 | p.add_option( | 372 | p.add_option( |
| 373 | "--ignore-remote-commits", | ||
| 374 | action="store_true", | ||
| 375 | default=False, | ||
| 376 | help="ignore commits already in remote branches", | ||
| 377 | ) | ||
| 378 | p.add_option( | ||
| 373 | "--no-cert-checks", | 379 | "--no-cert-checks", |
| 374 | dest="validate_certs", | 380 | dest="validate_certs", |
| 375 | action="store_false", | 381 | action="store_false", |
| @@ -738,10 +744,14 @@ Gerrit Code Review: https://www.gerritcodereview.com/ | |||
| 738 | cbr = None | 744 | cbr = None |
| 739 | if opt.current_branch: | 745 | if opt.current_branch: |
| 740 | cbr = project.CurrentBranch | 746 | cbr = project.CurrentBranch |
| 741 | up_branch = project.GetUploadableBranch(cbr) | 747 | up_branch = project.GetUploadableBranch( |
| 748 | cbr, ignore_remote_commits=opt.ignore_remote_commits | ||
| 749 | ) | ||
| 742 | avail = [up_branch] if up_branch else None | 750 | avail = [up_branch] if up_branch else None |
| 743 | else: | 751 | else: |
| 744 | avail = project.GetUploadableBranches(opt.branch) | 752 | avail = project.GetUploadableBranches( |
| 753 | opt.branch, ignore_remote_commits=opt.ignore_remote_commits | ||
| 754 | ) | ||
| 745 | return (project_idx, avail, cbr) | 755 | return (project_idx, avail, cbr) |
| 746 | 756 | ||
| 747 | def ValidateOptions(self, opt: optparse.Values, args: List[str]) -> None: | 757 | def ValidateOptions(self, opt: optparse.Values, args: List[str]) -> None: |
