Mercurial > public > mercurial-scm > hg-stable
diff hgext/transplant.py @ 20269:acb6cceaffd5
transplant: use "ui.extractchoices()" to show the list of available responses
Before this patch, transplant extension shows the list of available
responses by specific string, even though the prompt string passed to
"ui.promptchoice()" has enough (maybe i18n-ed) information.
This patch uses "ui.extractchoices()" to show the list of available
responses.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Mon, 02 Dec 2013 00:50:30 +0900 |
parents | 27d3f1fe42ac |
children | 8524cdf66a12 |
line wrap: on
line diff
--- a/hgext/transplant.py Mon Dec 02 00:50:30 2013 +0900 +++ b/hgext/transplant.py Mon Dec 02 00:50:30 2013 +0900 @@ -451,15 +451,6 @@ def browserevs(ui, repo, nodes, opts): '''interactively transplant changesets''' - def browsehelp(ui): - ui.write(_('y: transplant this changeset\n' - 'n: skip this changeset\n' - 'm: merge at this changeset\n' - 'p: show patch\n' - 'c: commit selected changesets\n' - 'q: cancel transplant\n' - '?: show this help\n')) - displayer = cmdutil.show_changeset(ui, repo, opts) transplants = [] merges = [] @@ -477,7 +468,8 @@ while not action: action = 'ynmpcq?'[ui.promptchoice(prompt)] if action == '?': - browsehelp(ui) + for c, t in ui.extractchoices(prompt)[1]: + ui.write('%s: %s\n' % (c, t)) action = None elif action == 'p': parent = repo.changelog.parents(node)[0]