diff options
author | Conley Owens <cco3@android.com> | 2014-10-21 18:03:53 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-10-21 18:03:55 +0000 |
commit | b4e50e67e84cccd34a9759d2414c7215d657659a (patch) | |
tree | 0b6cca46b9bbab16a56e92778d6abc2c4bf5ee16 /subcmds | |
parent | 0936aeab2ca7553a40d6cc7aa9a13bb083949e10 (diff) | |
parent | 14e134da02f3c050c9a6ec31242b45e27bdf4821 (diff) | |
download | git-repo-b4e50e67e84cccd34a9759d2414c7215d657659a.tar.gz |
Merge "upload: report names of uncommitted files"
Diffstat (limited to 'subcmds')
-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) |