diff options
-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 ac2ed146..d341458d 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py | |||
@@ -262,7 +262,7 @@ Gerrit Code Review: https://www.gerritcodereview.com/ | |||
262 | answer = sys.stdin.readline().strip().lower() | 262 | answer = sys.stdin.readline().strip().lower() |
263 | answer = answer in ('y', 'yes', '1', 'true', 't') | 263 | answer = answer in ('y', 'yes', '1', 'true', 't') |
264 | 264 | ||
265 | if answer: | 265 | if not opt.yes and answer: |
266 | if len(branch.commits) > UNUSUAL_COMMIT_THRESHOLD: | 266 | if len(branch.commits) > UNUSUAL_COMMIT_THRESHOLD: |
267 | answer = _ConfirmManyUploads() | 267 | answer = _ConfirmManyUploads() |
268 | 268 | ||
@@ -335,14 +335,15 @@ Gerrit Code Review: https://www.gerritcodereview.com/ | |||
335 | if not todo: | 335 | if not todo: |
336 | _die("nothing uncommented for upload") | 336 | _die("nothing uncommented for upload") |
337 | 337 | ||
338 | many_commits = False | 338 | if not opt.yes: |
339 | for branch in todo: | 339 | many_commits = False |
340 | if len(branch.commits) > UNUSUAL_COMMIT_THRESHOLD: | 340 | for branch in todo: |
341 | many_commits = True | 341 | if len(branch.commits) > UNUSUAL_COMMIT_THRESHOLD: |
342 | break | 342 | many_commits = True |
343 | if many_commits: | 343 | break |
344 | if not _ConfirmManyUploads(multiple_branches=True): | 344 | if many_commits: |
345 | _die("upload aborted by user") | 345 | if not _ConfirmManyUploads(multiple_branches=True): |
346 | _die("upload aborted by user") | ||
346 | 347 | ||
347 | self._UploadAndReport(opt, todo, people) | 348 | self._UploadAndReport(opt, todo, people) |
348 | 349 | ||