equal
deleted
inserted
replaced
449 except error.RevlogError: |
449 except error.RevlogError: |
450 return False |
450 return False |
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 = [] |
466 prompt = _('apply changeset? [ynmpcq?]:' |
457 prompt = _('apply changeset? [ynmpcq?]:' |
467 '$$ &yes, transplant this changeset' |
458 '$$ &yes, transplant this changeset' |
475 displayer.show(repo[node]) |
466 displayer.show(repo[node]) |
476 action = None |
467 action = None |
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] |
484 for chunk in patch.diff(repo, parent, node): |
476 for chunk in patch.diff(repo, parent, node): |
485 ui.write(chunk) |
477 ui.write(chunk) |