1
0
mirror of https://github.com/golang/go synced 2024-11-21 21:14:47 -07:00

codereview: update use of promptchoice for Mercurial 2.7

Fixes #6186.

R=golang-dev, bradfitz, remyoudompheng, rsc
CC=golang-dev
https://golang.org/cl/13112043
This commit is contained in:
Anthony Martin 2013-09-06 15:48:21 -04:00 committed by Russ Cox
parent e1ac15743b
commit 8f764fb689

View File

@ -712,6 +712,9 @@ Examples:
''' '''
def promptyesno(ui, msg): def promptyesno(ui, msg):
if hgversion >= "2.7":
return ui.promptchoice(msg + " $$ &yes $$ &no", 0) == 0
else:
return ui.promptchoice(msg, ["&yes", "&no"], 0) == 0 return ui.promptchoice(msg, ["&yes", "&no"], 0) == 0
def promptremove(ui, repo, f): def promptremove(ui, repo, f):