##// END OF EJS Templates
transplant: use "ui.extractchoices()" to show the list of available responses...
FUJIWARA Katsunori -
r20269:acb6ccea default
parent child Browse files
Show More
@@ -451,15 +451,6 b' def hasnode(repo, node):'
451
451
452 def browserevs(ui, repo, nodes, opts):
452 def browserevs(ui, repo, nodes, opts):
453 '''interactively transplant changesets'''
453 '''interactively transplant changesets'''
454 def browsehelp(ui):
455 ui.write(_('y: transplant this changeset\n'
456 'n: skip this changeset\n'
457 'm: merge at this changeset\n'
458 'p: show patch\n'
459 'c: commit selected changesets\n'
460 'q: cancel transplant\n'
461 '?: show this help\n'))
462
463 displayer = cmdutil.show_changeset(ui, repo, opts)
454 displayer = cmdutil.show_changeset(ui, repo, opts)
464 transplants = []
455 transplants = []
465 merges = []
456 merges = []
@@ -477,7 +468,8 b' def browserevs(ui, repo, nodes, opts):'
477 while not action:
468 while not action:
478 action = 'ynmpcq?'[ui.promptchoice(prompt)]
469 action = 'ynmpcq?'[ui.promptchoice(prompt)]
479 if action == '?':
470 if action == '?':
480 browsehelp(ui)
471 for c, t in ui.extractchoices(prompt)[1]:
472 ui.write('%s: %s\n' % (c, t))
481 action = None
473 action = None
482 elif action == 'p':
474 elif action == 'p':
483 parent = repo.changelog.parents(node)[0]
475 parent = repo.changelog.parents(node)[0]
@@ -493,13 +493,13 b' test interactive transplant'
493 > EOF
493 > EOF
494 1:d11e3596cc1a
494 1:d11e3596cc1a
495 apply changeset? [ynmpcq?]: unrecognized response
495 apply changeset? [ynmpcq?]: unrecognized response
496 apply changeset? [ynmpcq?]: y: transplant this changeset
496 apply changeset? [ynmpcq?]: y: yes, transplant this changeset
497 n: skip this changeset
497 n: no, skip this changeset
498 m: merge at this changeset
498 m: merge at this changeset
499 p: show patch
499 p: show patch
500 c: commit selected changesets
500 c: commit selected changesets
501 q: cancel transplant
501 q: quit and cancel transplant
502 ?: show this help
502 ?: ? (show this help)
503 apply changeset? [ynmpcq?]: 4:a53251cdf717
503 apply changeset? [ynmpcq?]: 4:a53251cdf717
504 apply changeset? [ynmpcq?]: (no-eol)
504 apply changeset? [ynmpcq?]: (no-eol)
505 $ hg heads --template "{node|short}\n"
505 $ hg heads --template "{node|short}\n"
General Comments 0
You need to be logged in to leave comments. Login now