comparison mercurial/ui.py @ 9312:c5f0825c1dbb

kill trailing whitespace
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Wed, 05 Aug 2009 17:08:28 +0200
parents 6adc899c98d0
children 3fb8c6dbeeec
comparison
equal deleted inserted replaced
9311:e37e9904bf10 9312:c5f0825c1dbb
286 286
287 def promptchoice(self, msg, choices, default=0): 287 def promptchoice(self, msg, choices, default=0):
288 """Prompt user with msg, read response, and ensure it matches 288 """Prompt user with msg, read response, and ensure it matches
289 one of the provided choices. The index of the choice is returned. 289 one of the provided choices. The index of the choice is returned.
290 choices is a sequence of acceptable responses with the format: 290 choices is a sequence of acceptable responses with the format:
291 ('&None', 'E&xec', 'Sym&link') Responses are case insensitive. 291 ('&None', 'E&xec', 'Sym&link') Responses are case insensitive.
292 If ui is not interactive, the default is returned. 292 If ui is not interactive, the default is returned.
293 """ 293 """
294 resps = [s[s.index('&')+1].lower() for s in choices] 294 resps = [s[s.index('&')+1].lower() for s in choices]
295 while True: 295 while True:
296 r = self.prompt(msg, resps[default]) 296 r = self.prompt(msg, resps[default])