From e9311273dda9aef91c563cd69b30f7a7491c56b5 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 11 Aug 2011 15:46:43 -0400 Subject: [PATCH] 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 --- subcmds/init.py | 4 ++-- subcmds/upload.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/subcmds/init.py b/subcmds/init.py index 9214aed..1c23d62 100644 --- a/subcmds/init.py +++ b/subcmds/init.py @@ -189,7 +189,7 @@ to update the working directory files. print '' 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() if a in ('yes', 'y', 't', 'true'): break @@ -231,7 +231,7 @@ to update the working directory files. out.printer(fg='black', attr=c)(' %-6s ', c) 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() if a in ('y', 'yes', 't', 'true', 'on'): gc.SetString('color.ui', 'auto') diff --git a/subcmds/upload.py b/subcmds/upload.py index a08926c..c152e75 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py @@ -73,7 +73,7 @@ Configuration 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 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 @@ -171,7 +171,7 @@ Gerrit Code Review: http://code.google.com/p/gerrit/ for commit in list: 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 = 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 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() if a not in ('y', 'yes', 't', 'true', 'on'): print >>sys.stderr, "skipping upload"