summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2011-08-11 15:46:43 -0400
committerShawn O. Pearce <sop@google.com>2011-11-29 12:38:52 -0800
commite9311273dda9aef91c563cd69b30f7a7491c56b5 (patch)
treebb9d6134f3babbc66f0fcace85989c53129b5de9
parent605a9a487bba6e25fb48d4e3076c89b7f686517a (diff)
downloadgit-repo-e9311273dda9aef91c563cd69b30f7a7491c56b5.tar.gz
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
-rw-r--r--subcmds/init.py4
-rw-r--r--subcmds/upload.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/subcmds/init.py b/subcmds/init.py
index 9214aed5..1c23d620 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -189,7 +189,7 @@ to update the working directory files.
189 189
190 print '' 190 print ''
191 print 'Your identity is: %s <%s>' % (name, email) 191 print 'Your identity is: %s <%s>' % (name, email)
192 sys.stdout.write('is this correct [y/n]? ') 192 sys.stdout.write('is this correct [y/N]? ')
193 a = sys.stdin.readline().strip() 193 a = sys.stdin.readline().strip()
194 if a in ('yes', 'y', 't', 'true'): 194 if a in ('yes', 'y', 't', 'true'):
195 break 195 break
@@ -231,7 +231,7 @@ to update the working directory files.
231 out.printer(fg='black', attr=c)(' %-6s ', c) 231 out.printer(fg='black', attr=c)(' %-6s ', c)
232 out.nl() 232 out.nl()
233 233
234 sys.stdout.write('Enable color display in this user account (y/n)? ') 234 sys.stdout.write('Enable color display in this user account (y/N)? ')
235 a = sys.stdin.readline().strip().lower() 235 a = sys.stdin.readline().strip().lower()
236 if a in ('y', 'yes', 't', 'true', 'on'): 236 if a in ('y', 'yes', 't', 'true', 'on'):
237 gc.SetString('color.ui', 'auto') 237 gc.SetString('color.ui', 'auto')
diff --git a/subcmds/upload.py b/subcmds/upload.py
index a08926c6..c152e75d 100644
--- a/subcmds/upload.py
+++ b/subcmds/upload.py
@@ -73,7 +73,7 @@ Configuration
73 73
74review.URL.autoupload: 74review.URL.autoupload:
75 75
76To disable the "Upload ... (y/n)?" prompt, you can set a per-project 76To disable the "Upload ... (y/N)?" prompt, you can set a per-project
77or global Git configuration option. If review.URL.autoupload is set 77or global Git configuration option. If review.URL.autoupload is set
78to "true" then repo will assume you always answer "y" at the prompt, 78to "true" then repo will assume you always answer "y" at the prompt,
79and will not prompt you further. If it is set to "false" then repo 79and 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/
171 for commit in list: 171 for commit in list:
172 print ' %s' % commit 172 print ' %s' % commit
173 173
174 sys.stdout.write('to %s (y/n)? ' % remote.review) 174 sys.stdout.write('to %s (y/N)? ' % remote.review)
175 answer = sys.stdin.readline().strip() 175 answer = sys.stdin.readline().strip()
176 answer = answer in ('y', 'Y', 'yes', '1', 'true', 't') 176 answer = answer in ('y', 'Y', 'yes', '1', 'true', 't')
177 177
@@ -299,7 +299,7 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
299 299
300 # if they want to auto upload, let's not ask because it could be automated 300 # if they want to auto upload, let's not ask because it could be automated
301 if answer is None: 301 if answer is None:
302 sys.stdout.write('Uncommitted changes in ' + branch.project.name + ' (did you forget to amend?). Continue uploading? (y/n) ') 302 sys.stdout.write('Uncommitted changes in ' + branch.project.name + ' (did you forget to amend?). Continue uploading? (y/N) ')
303 a = sys.stdin.readline().strip().lower() 303 a = sys.stdin.readline().strip().lower()
304 if a not in ('y', 'yes', 't', 'true', 'on'): 304 if a not in ('y', 'yes', 't', 'true', 'on'):
305 print >>sys.stderr, "skipping upload" 305 print >>sys.stderr, "skipping upload"