diff options
Diffstat (limited to 'subcmds/upload.py')
-rw-r--r-- | subcmds/upload.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py index e7e5b1bf..d0dd3837 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py | |||
@@ -221,7 +221,9 @@ Gerrit Code Review: https://www.gerritcodereview.com/ | |||
221 | for commit in commit_list: | 221 | for commit in commit_list: |
222 | print(' %s' % commit) | 222 | print(' %s' % commit) |
223 | 223 | ||
224 | sys.stdout.write('to %s (y/N)? ' % remote.review) | 224 | print('to %s (y/N)? ' % remote.review, end='') |
225 | # TODO: When we require Python 3, use flush=True w/print above. | ||
226 | sys.stdout.flush() | ||
225 | answer = sys.stdin.readline().strip().lower() | 227 | answer = sys.stdin.readline().strip().lower() |
226 | answer = answer in ('y', 'yes', '1', 'true', 't') | 228 | answer = answer in ('y', 'yes', '1', 'true', 't') |
227 | 229 | ||
@@ -360,10 +362,13 @@ Gerrit Code Review: https://www.gerritcodereview.com/ | |||
360 | 362 | ||
361 | # if they want to auto upload, let's not ask because it could be automated | 363 | # if they want to auto upload, let's not ask because it could be automated |
362 | if answer is None: | 364 | if answer is None: |
363 | sys.stdout.write('Uncommitted changes in ' + branch.project.name) | 365 | print() |
364 | sys.stdout.write(' (did you forget to amend?):\n') | 366 | print('Uncommitted changes in %s (did you forget to amend?):' |
365 | sys.stdout.write('\n'.join(changes) + '\n') | 367 | % branch.project.name) |
366 | sys.stdout.write('Continue uploading? (y/N) ') | 368 | print('\n'.join(changes)) |
369 | print('Continue uploading? (y/N) ', end='') | ||
370 | # TODO: When we require Python 3, use flush=True w/print above. | ||
371 | sys.stdout.flush() | ||
367 | a = sys.stdin.readline().strip().lower() | 372 | a = sys.stdin.readline().strip().lower() |
368 | if a not in ('y', 'yes', 't', 'true', 'on'): | 373 | if a not in ('y', 'yes', 't', 'true', 'on'): |
369 | print("skipping upload", file=sys.stderr) | 374 | print("skipping upload", file=sys.stderr) |