]> Cypherpunks repositories - gostls13.git/commitdiff
codereview: update use of promptchoice for Mercurial 2.7
authorAnthony Martin <ality@pbrane.org>
Fri, 6 Sep 2013 19:48:21 +0000 (15:48 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 6 Sep 2013 19:48:21 +0000 (15:48 -0400)
Fixes #6186.

R=golang-dev, bradfitz, remyoudompheng, rsc
CC=golang-dev
https://golang.org/cl/13112043

lib/codereview/codereview.py

index 39cdc0f273475fead4069d2022088e375ef5f56d..01d14c4a23acf595bc969882ea3ddf26d6caac09 100644 (file)
@@ -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,)):