repo: capitalize default prompt char

It is common in command line tools to indicate what the default answer
will be if the user simply hits enter.  In repo, the display is just
"y/n" with no indication as to which is the default.  So change the n
to N in the messages since that is how repo operates.

Change-Id: I81819ae630355072eb0365e59168b0921289498f
This commit is contained in:
Mike Frysinger 2011-08-11 15:46:43 -04:00 committed by Shawn O. Pearce
parent 605a9a487b
commit e9311273dd
2 changed files with 5 additions and 5 deletions

View File

@ -189,7 +189,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]? ')
a = sys.stdin.readline().strip() a = sys.stdin.readline().strip()
if a in ('yes', 'y', 't', 'true'): if a in ('yes', 'y', 't', 'true'):
break break
@ -231,7 +231,7 @@ to update the working directory files.
out.printer(fg='black', attr=c)(' %-6s ', c) out.printer(fg='black', attr=c)(' %-6s ', c)
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)? ')
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')

View File

@ -73,7 +73,7 @@ Configuration
review.URL.autoupload: review.URL.autoupload:
To disable the "Upload ... (y/n)?" prompt, you can set a per-project To disable the "Upload ... (y/N)?" prompt, you can set a per-project
or global Git configuration option. If review.URL.autoupload is set or global Git configuration option. If review.URL.autoupload is set
to "true" then repo will assume you always answer "y" at the prompt, to "true" then repo will assume you always answer "y" at the prompt,
and will not prompt you further. If it is set to "false" then repo and will not prompt you further. If it is set to "false" then repo
@ -171,7 +171,7 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
for commit in list: for commit in list:
print ' %s' % commit print ' %s' % commit
sys.stdout.write('to %s (y/n)? ' % remote.review) sys.stdout.write('to %s (y/N)? ' % remote.review)
answer = sys.stdin.readline().strip() answer = sys.stdin.readline().strip()
answer = answer in ('y', 'Y', 'yes', '1', 'true', 't') answer = answer in ('y', 'Y', 'yes', '1', 'true', 't')
@ -299,7 +299,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) ')
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 >>sys.stderr, "skipping upload" print >>sys.stderr, "skipping upload"