mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00: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:
parent
e1ac15743b
commit
8f764fb689
1 changed files with 4 additions and 1 deletions
|
|
@ -712,7 +712,10 @@ Examples:
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def promptyesno(ui, msg):
|
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):
|
def promptremove(ui, repo, f):
|
||||||
if promptyesno(ui, "hg remove %s (y/n)?" % (f,)):
|
if promptyesno(ui, "hg remove %s (y/n)?" % (f,)):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue