Skip to content

Commit

Permalink
codereview: update use of promptchoice for Mercurial 2.7
Browse files Browse the repository at this point in the history
Fixes golang#6186.

R=golang-dev, bradfitz, remyoudompheng, rsc
CC=golang-dev
https://golang.org/cl/13112043
  • Loading branch information
ality authored and rsc committed Sep 6, 2013
1 parent e1ac157 commit 8f764fb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/codereview/codereview.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,10 @@ def line1(text):
'''

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,)):
Expand Down

0 comments on commit 8f764fb

Please sign in to comment.