diff options
Diffstat (limited to 'subcmds/upload.py')
| -rw-r--r-- | subcmds/upload.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py index 0ee36df1..674fc17d 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py | |||
| @@ -339,13 +339,17 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ | |||
| 339 | self._AppendAutoList(branch, people) | 339 | self._AppendAutoList(branch, people) |
| 340 | 340 | ||
| 341 | # Check if there are local changes that may have been forgotten | 341 | # Check if there are local changes that may have been forgotten |
| 342 | if branch.project.HasChanges(): | 342 | changes = branch.project.UncommitedFiles() |
| 343 | if changes: | ||
| 343 | key = 'review.%s.autoupload' % branch.project.remote.review | 344 | key = 'review.%s.autoupload' % branch.project.remote.review |
| 344 | answer = branch.project.config.GetBoolean(key) | 345 | answer = branch.project.config.GetBoolean(key) |
| 345 | 346 | ||
| 346 | # if they want to auto upload, let's not ask because it could be automated | 347 | # if they want to auto upload, let's not ask because it could be automated |
| 347 | if answer is None: | 348 | if answer is None: |
| 348 | sys.stdout.write('Uncommitted changes in ' + branch.project.name + ' (did you forget to amend?). Continue uploading? (y/N) ') | 349 | sys.stdout.write('Uncommitted changes in ' + branch.project.name) |
| 350 | sys.stdout.write(' (did you forget to amend?):\n') | ||
| 351 | sys.stdout.write('\n'.join(changes) + '\n') | ||
| 352 | sys.stdout.write('Continue uploading? (y/N) ') | ||
| 349 | a = sys.stdin.readline().strip().lower() | 353 | a = sys.stdin.readline().strip().lower() |
| 350 | if a not in ('y', 'yes', 't', 'true', 'on'): | 354 | if a not in ('y', 'yes', 't', 'true', 'on'): |
| 351 | print("skipping upload", file=sys.stderr) | 355 | print("skipping upload", file=sys.stderr) |
