490 break |
491 break |
491 displayer.close() |
492 displayer.close() |
492 return (transplants, merges) |
493 return (transplants, merges) |
493 |
494 |
494 @command('transplant', |
495 @command('transplant', |
495 [('s', 'source', '', _('pull patches from REPO'), _('REPO')), |
496 [('s', 'source', '', _('transplant changesets from REPO'), _('REPO')), |
496 ('b', 'branch', [], _('use this source changeset as head'), _('REV')), |
497 ('b', 'branch', [], _('use this source changeset as head'), _('REV')), |
497 ('a', 'all', None, _('pull all changesets up to the --branch revisions')), |
498 ('a', 'all', None, _('pull all changesets up to the --branch revisions')), |
498 ('p', 'prune', [], _('skip over REV'), _('REV')), |
499 ('p', 'prune', [], _('skip over REV'), _('REV')), |
499 ('m', 'merge', [], _('merge at REV'), _('REV')), |
500 ('m', 'merge', [], _('merge at REV'), _('REV')), |
500 ('', 'parent', '', |
501 ('', 'parent', '', |
501 _('parent to choose when transplanting merge'), _('REV')), |
502 _('parent to choose when transplanting merge'), _('REV')), |
502 ('e', 'edit', False, _('invoke editor on commit messages')), |
503 ('e', 'edit', False, _('invoke editor on commit messages')), |
503 ('', 'log', None, _('append transplant info to log message')), |
504 ('', 'log', None, _('append transplant info to log message')), |
504 ('c', 'continue', None, _('continue last transplant session ' |
505 ('c', 'continue', None, _('continue last transplant session ' |
505 'after repair')), |
506 'after fixing conflicts')), |
506 ('', 'filter', '', |
507 ('', 'filter', '', |
507 _('filter changesets through command'), _('CMD'))], |
508 _('filter changesets through command'), _('CMD'))], |
508 _('hg transplant [-s REPO] [-b BRANCH [-a]] [-p REV] ' |
509 _('hg transplant [-s REPO] [-b BRANCH [-a]] [-p REV] ' |
509 '[-m REV] [REV]...')) |
510 '[-m REV] [REV]...')) |
510 def transplant(ui, repo, *revs, **opts): |
511 def transplant(ui, repo, *revs, **opts): |
511 '''transplant changesets from another branch |
512 '''transplant changesets from another branch |
512 |
513 |
513 Selected changesets will be applied on top of the current working |
514 Selected changesets will be applied on top of the current working |
514 directory with the log of the original changeset. The changesets |
515 directory with the log of the original changeset. The changesets |
515 are copied and will thus appear twice in the history. Use the |
516 are copied and will thus appear twice in the history with different |
516 rebase extension instead if you want to move a whole branch of |
517 identities. |
517 unpublished changesets. |
518 |
|
519 Consider using the graft command if everything is inside the same |
|
520 repository - it will use merges and will usually give a better result. |
|
521 Use the rebase extension if the changesets are unpublished and you want |
|
522 to move them instead of copying them. |
518 |
523 |
519 If --log is specified, log messages will have a comment appended |
524 If --log is specified, log messages will have a comment appended |
520 of the form:: |
525 of the form:: |
521 |
526 |
522 (transplanted from CHANGESETHASH) |
527 (transplanted from CHANGESETHASH) |
523 |
528 |
524 You can rewrite the changelog message with the --filter option. |
529 You can rewrite the changelog message with the --filter option. |
525 Its argument will be invoked with the current changelog message as |
530 Its argument will be invoked with the current changelog message as |
526 $1 and the patch as $2. |
531 $1 and the patch as $2. |
527 |
532 |
528 If --source/-s is specified, selects changesets from the named |
533 --source/-s specifies another repository to use for selecting changesets, |
529 repository. |
534 just as if it temporarily had been pulled. |
530 If --branch/-b is specified, these revisions will be used as |
535 If --branch/-b is specified, these revisions will be used as |
531 heads when deciding which changsets to transplant, just as if only |
536 heads when deciding which changsets to transplant, just as if only |
532 these revisions had been pulled. |
537 these revisions had been pulled. |
533 If --all/-a is specified, all the revisions up to the heads specified |
538 If --all/-a is specified, all the revisions up to the heads specified |
534 with --branch will be transplanted. |
539 with --branch will be transplanted. |