hgext/transplant.py
changeset 20268 27d3f1fe42ac
parent 20020 6fb59247c7d5
child 20269 acb6cceaffd5
--- a/hgext/transplant.py	Mon Dec 02 00:50:30 2013 +0900
+++ b/hgext/transplant.py	Mon Dec 02 00:50:30 2013 +0900
@@ -463,11 +463,19 @@
     displayer = cmdutil.show_changeset(ui, repo, opts)
     transplants = []
     merges = []
+    prompt = _('apply changeset? [ynmpcq?]:'
+               '$$ &yes, transplant this changeset'
+               '$$ &no, skip this changeset'
+               '$$ &merge at this changeset'
+               '$$ show &patch'
+               '$$ &commit selected changesets'
+               '$$ &quit and cancel transplant'
+               '$$ &? (show this help)')
     for node in nodes:
         displayer.show(repo[node])
         action = None
         while not action:
-            action = ui.prompt(_('apply changeset? [ynmpcq?]:'))
+            action = 'ynmpcq?'[ui.promptchoice(prompt)]
             if action == '?':
                 browsehelp(ui)
                 action = None
@@ -476,9 +484,6 @@
                 for chunk in patch.diff(repo, parent, node):
                     ui.write(chunk)
                 action = None
-            elif action not in ('y', 'n', 'm', 'c', 'q'):
-                ui.write(_('no such option\n'))
-                action = None
         if action == 'y':
             transplants.append(node)
         elif action == 'm':