Show More
@@ -7,7 +7,8 b'' | |||||
7 |
|
7 | |||
8 | '''command to transplant changesets from another branch |
|
8 | '''command to transplant changesets from another branch | |
9 |
|
9 | |||
10 |
This extension allows you to transplant |
|
10 | This extension allows you to transplant changes to another parent revision, | |
|
11 | possibly in another repository. The transplant is done using 'diff' patches. | |||
11 |
|
12 | |||
12 | Transplanted patches are recorded in .hg/transplant/transplants, as a |
|
13 | Transplanted patches are recorded in .hg/transplant/transplants, as a | |
13 | map from a changeset hash to its hash in the source repository. |
|
14 | map from a changeset hash to its hash in the source repository. | |
@@ -492,7 +493,7 b' def browserevs(ui, repo, nodes, opts):' | |||||
492 | return (transplants, merges) |
|
493 | return (transplants, merges) | |
493 |
|
494 | |||
494 | @command('transplant', |
|
495 | @command('transplant', | |
495 |
[('s', 'source', '', _('p |
|
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')), | |
@@ -502,7 +503,7 b' def browserevs(ui, repo, nodes, opts):' | |||||
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 |
|
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] ' | |
@@ -512,9 +513,13 b' def transplant(ui, repo, *revs, **opts):' | |||||
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 |
|
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:: | |
@@ -525,8 +530,8 b' def transplant(ui, repo, *revs, **opts):' | |||||
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. | |
@@ -576,7 +581,7 b' def transplant(ui, repo, *revs, **opts):' | |||||
576 | if opts.get('continue'): |
|
581 | if opts.get('continue'): | |
577 | if opts.get('branch') or opts.get('all') or opts.get('merge'): |
|
582 | if opts.get('branch') or opts.get('all') or opts.get('merge'): | |
578 | raise util.Abort(_('--continue is incompatible with ' |
|
583 | raise util.Abort(_('--continue is incompatible with ' | |
579 |
'branch, |
|
584 | '--branch, --all and --merge')) | |
580 | return |
|
585 | return | |
581 | if not (opts.get('source') or revs or |
|
586 | if not (opts.get('source') or revs or | |
582 | opts.get('merge') or opts.get('branch')): |
|
587 | opts.get('merge') or opts.get('branch')): |
General Comments 0
You need to be logged in to leave comments.
Login now