From 8f764fb689ea4313c5a6de2cabdf65aee9f89c5d Mon Sep 17 00:00:00 2001 From: Anthony Martin Date: Fri, 6 Sep 2013 15:48:21 -0400 Subject: [PATCH] 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 --- lib/codereview/codereview.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py index 39cdc0f2734..01d14c4a23a 100644 --- a/lib/codereview/codereview.py +++ b/lib/codereview/codereview.py @@ -712,7 +712,10 @@ Examples: ''' def promptyesno(ui, msg): - return ui.promptchoice(msg, ["&yes", "&no"], 0) == 0 + if hgversion >= "2.7": + return ui.promptchoice(msg + " $$ &yes $$ &no", 0) == 0 + else: + return ui.promptchoice(msg, ["&yes", "&no"], 0) == 0 def promptremove(ui, repo, f): if promptyesno(ui, "hg remove %s (y/n)?" % (f,)):