Commit ee3b6f75 authored by mputz's avatar mputz Committed by Matthias Putz

fixed not-flushed output on user interaction + added small feature/bug list in notes

parent 40a71c44
# TODO # TODO
Bugs:
*
Features:
* upload via https * upload via https
* [Linux] analyse problem if git-config not set
* comment username + email in config
* strange behaviour if prompted
# Notes on compability # Notes on compability
......
...@@ -223,6 +223,7 @@ to update the working directory files. ...@@ -223,6 +223,7 @@ to update the working directory files.
def _Prompt(self, prompt, value): def _Prompt(self, prompt, value):
sys.stdout.write('%-10s [%s]: ' % (prompt, value)) sys.stdout.write('%-10s [%s]: ' % (prompt, value))
sys.stdout.flush()
a = sys.stdin.readline().strip() a = sys.stdin.readline().strip()
if a == '': if a == '':
return value return value
...@@ -257,6 +258,7 @@ to update the working directory files. ...@@ -257,6 +258,7 @@ to update the working directory files.
print() print()
print('Your identity is: %s <%s>' % (name, email)) print('Your identity is: %s <%s>' % (name, email))
sys.stdout.write('is this correct [y/N]? ') sys.stdout.write('is this correct [y/N]? ')
sys.stdout.flush()
a = sys.stdin.readline().strip().lower() a = sys.stdin.readline().strip().lower()
if a in ('yes', 'y', 't', 'true'): if a in ('yes', 'y', 't', 'true'):
break break
...@@ -299,6 +301,7 @@ to update the working directory files. ...@@ -299,6 +301,7 @@ to update the working directory files.
out.nl() out.nl()
sys.stdout.write('Enable color display in this user account (y/N)? ') sys.stdout.write('Enable color display in this user account (y/N)? ')
sys.stdout.flush()
a = sys.stdin.readline().strip().lower() a = sys.stdin.readline().strip().lower()
if a in ('y', 'yes', 't', 'true', 'on'): if a in ('y', 'yes', 't', 'true', 'on'):
gc.SetString('color.ui', 'auto') gc.SetString('color.ui', 'auto')
......
...@@ -320,6 +320,7 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ ...@@ -320,6 +320,7 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
# if they want to auto upload, let's not ask because it could be automated # if they want to auto upload, let's not ask because it could be automated
if answer is None: if answer is None:
sys.stdout.write('Uncommitted changes in ' + branch.project.name + ' (did you forget to amend?). Continue uploading? (y/N) ') sys.stdout.write('Uncommitted changes in ' + branch.project.name + ' (did you forget to amend?). Continue uploading? (y/N) ')
sys.stdout.flush()
a = sys.stdin.readline().strip().lower() a = sys.stdin.readline().strip().lower()
if a not in ('y', 'yes', 't', 'true', 'on'): if a not in ('y', 'yes', 't', 'true', 'on'):
print("skipping upload", file=sys.stderr) print("skipping upload", file=sys.stderr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment