| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 6 |
<meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" /> |
| 7 |
<title>transplant</title> |
| 8 |
<link rel="stylesheet" href="../style.css" type="text/css" /> |
| 9 |
</head> |
| 10 |
<body> |
| 11 |
<div class="document" id="transplant"> |
| 12 |
<span id="ext-transplant"></span> |
| 13 |
<h1 class="title">transplant</h1> |
| 14 |
|
| 15 |
<div class="contents htmlonly topic" id="contents"> |
| 16 |
<p class="topic-title"><a class="reference internal" href="#top">Contents</a></p> |
| 17 |
<ul class="simple"> |
| 18 |
<li><a class="reference internal" href="#description" id="toc-entry-1">Description</a></li> |
| 19 |
<li><a class="reference internal" href="#commands" id="toc-entry-2">Commands</a><ul> |
| 20 |
<li><a class="reference internal" href="#change-manipulation" id="toc-entry-3">Change manipulation</a></li> |
| 21 |
</ul> |
| 22 |
</li> |
| 23 |
</ul> |
| 24 |
</div> |
| 25 |
<p>command to transplant changesets from another branch</p> |
| 26 |
<div class="section" id="description"> |
| 27 |
<h1><a class="toc-backref" href="#contents">Description</a></h1> |
| 28 |
<p>This extension allows you to transplant changes to another parent revision, |
| 29 |
possibly in another repository. The transplant is done using 'diff' patches.</p> |
| 30 |
<p>Transplanted patches are recorded in .hg/transplant/transplants, as a |
| 31 |
map from a changeset hash to its hash in the source repository.</p> |
| 32 |
</div> |
| 33 |
<div class="section" id="commands"> |
| 34 |
<h1><a class="toc-backref" href="#contents">Commands</a></h1> |
| 35 |
<div class="section" id="change-manipulation"> |
| 36 |
<h2><a class="toc-backref" href="#contents">Change manipulation</a></h2> |
| 37 |
<div class="section" id="transplant-1"> |
| 38 |
<h3>transplant</h3> |
| 39 |
<p>transplant changesets from another branch:</p> |
| 40 |
<pre class="literal-block"> |
| 41 |
hg transplant [-s REPO] [-b BRANCH [-a]] [-p REV] [-m REV] [REV]... |
| 42 |
</pre> |
| 43 |
<p>Selected changesets will be applied on top of the current working |
| 44 |
directory with the log of the original changeset. The changesets |
| 45 |
are copied and will thus appear twice in the history with different |
| 46 |
identities.</p> |
| 47 |
<p>Consider using the graft command if everything is inside the same |
| 48 |
repository - it will use merges and will usually give a better result. |
| 49 |
Use the rebase extension if the changesets are unpublished and you want |
| 50 |
to move them instead of copying them.</p> |
| 51 |
<p>If --log is specified, log messages will have a comment appended |
| 52 |
of the form:</p> |
| 53 |
<pre class="literal-block"> |
| 54 |
(transplanted from CHANGESETHASH) |
| 55 |
</pre> |
| 56 |
<p>You can rewrite the changelog message with the --filter option. |
| 57 |
Its argument will be invoked with the current changelog message as |
| 58 |
$1 and the patch as $2.</p> |
| 59 |
<p>--source/-s specifies another repository to use for selecting changesets, |
| 60 |
just as if it temporarily had been pulled. |
| 61 |
If --branch/-b is specified, these revisions will be used as |
| 62 |
heads when deciding which changesets to transplant, just as if only |
| 63 |
these revisions had been pulled. |
| 64 |
If --all/-a is specified, all the revisions up to the heads specified |
| 65 |
with --branch will be transplanted.</p> |
| 66 |
<p>Example:</p> |
| 67 |
<ul> |
| 68 |
<li><p class="first">transplant all changes up to REV on top of your current revision:</p> |
| 69 |
<pre class="literal-block"> |
| 70 |
hg transplant --branch REV --all |
| 71 |
</pre> |
| 72 |
</li> |
| 73 |
</ul> |
| 74 |
<p>You can optionally mark selected transplanted changesets as merge |
| 75 |
changesets. You will not be prompted to transplant any ancestors |
| 76 |
of a merged transplant, and you can merge descendants of them |
| 77 |
normally instead of transplanting them.</p> |
| 78 |
<p>Merge changesets may be transplanted directly by specifying the |
| 79 |
proper parent changeset by calling <a class="reference external" href="hg-transplant.html"><tt class="docutils literal">hg transplant <span class="pre">--parent</span></tt></a>.</p> |
| 80 |
<p>If no merges or revisions are provided, <a class="reference external" href="hg-transplant.html"><tt class="docutils literal">hg transplant</tt></a> will |
| 81 |
start an interactive changeset browser.</p> |
| 82 |
<p>If a changeset application fails, you can fix the merge by hand |
| 83 |
and then resume where you left off by calling <a class="reference external" href="hg-transplant.html"><tt class="docutils literal">hg transplant |
| 84 |
<span class="pre">--continue/-c</span></tt></a>.</p> |
| 85 |
<p>Options:</p> |
| 86 |
<table class="docutils option-list" frame="void" rules="none"> |
| 87 |
<col class="option" /> |
| 88 |
<col class="description" /> |
| 89 |
<tbody valign="top"> |
| 90 |
<tr><td class="option-group" colspan="2"> |
| 91 |
<kbd><span class="option">-s</span>, <span class="option">--source <var><REPO></var></span></kbd></td> |
| 92 |
</tr> |
| 93 |
<tr><td> </td><td>transplant changesets from REPO</td></tr> |
| 94 |
<tr><td class="option-group" colspan="2"> |
| 95 |
<kbd><span class="option">-b</span>, <span class="option">--branch <var><REV[+]></var></span></kbd></td> |
| 96 |
</tr> |
| 97 |
<tr><td> </td><td>use this source changeset as head</td></tr> |
| 98 |
<tr><td class="option-group"> |
| 99 |
<kbd><span class="option">-a</span>, <span class="option">--all</span></kbd></td> |
| 100 |
<td>pull all changesets up to the --branch revisions</td></tr> |
| 101 |
<tr><td class="option-group" colspan="2"> |
| 102 |
<kbd><span class="option">-p</span>, <span class="option">--prune <var><REV[+]></var></span></kbd></td> |
| 103 |
</tr> |
| 104 |
<tr><td> </td><td>skip over REV</td></tr> |
| 105 |
<tr><td class="option-group" colspan="2"> |
| 106 |
<kbd><span class="option">-m</span>, <span class="option">--merge <var><REV[+]></var></span></kbd></td> |
| 107 |
</tr> |
| 108 |
<tr><td> </td><td>merge at REV</td></tr> |
| 109 |
<tr><td class="option-group"> |
| 110 |
<kbd><span class="option">--parent <var><REV></var></span></kbd></td> |
| 111 |
<td>parent to choose when transplanting merge</td></tr> |
| 112 |
<tr><td class="option-group"> |
| 113 |
<kbd><span class="option">-e</span>, <span class="option">--edit</span></kbd></td> |
| 114 |
<td>invoke editor on commit messages</td></tr> |
| 115 |
<tr><td class="option-group"> |
| 116 |
<kbd><span class="option">--log</span></kbd></td> |
| 117 |
<td>append transplant info to log message</td></tr> |
| 118 |
<tr><td class="option-group"> |
| 119 |
<kbd><span class="option">--stop</span></kbd></td> |
| 120 |
<td>stop interrupted transplant</td></tr> |
| 121 |
<tr><td class="option-group"> |
| 122 |
<kbd><span class="option">-c</span>, <span class="option">--continue</span></kbd></td> |
| 123 |
<td>continue last transplant session after fixing conflicts</td></tr> |
| 124 |
<tr><td class="option-group"> |
| 125 |
<kbd><span class="option">--filter <var><CMD></var></span></kbd></td> |
| 126 |
<td>filter changesets through command</td></tr> |
| 127 |
</tbody> |
| 128 |
</table> |
| 129 |
<p>[+] marked option can be specified multiple times</p> |
| 130 |
</div> |
| 131 |
</div> |
| 132 |
</div> |
| 133 |
</div> |
| 134 |
</body> |
| 135 |
</html> |