| 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>absorb</title> |
| 8 |
<link rel="stylesheet" href="../style.css" type="text/css" /> |
| 9 |
</head> |
| 10 |
<body> |
| 11 |
<div class="document" id="absorb"> |
| 12 |
<span id="ext-absorb"></span> |
| 13 |
<h1 class="title">absorb</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-creation" id="toc-entry-3">Change creation</a></li> |
| 21 |
</ul> |
| 22 |
</li> |
| 23 |
</ul> |
| 24 |
</div> |
| 25 |
<p>apply working directory changes to changesets (EXPERIMENTAL)</p> |
| 26 |
<div class="section" id="description"> |
| 27 |
<h1><a class="toc-backref" href="#contents">Description</a></h1> |
| 28 |
<p>The absorb extension provides a command to use annotate information to |
| 29 |
amend modified chunks into the corresponding non-public changesets.</p> |
| 30 |
<pre class="literal-block"> |
| 31 |
[absorb] |
| 32 |
# only check 50 recent non-public changesets at most |
| 33 |
max-stack-size = 50 |
| 34 |
# whether to add noise to new commits to avoid obsolescence cycle |
| 35 |
add-noise = 1 |
| 36 |
# make `amend --correlated` a shortcut to the main command |
| 37 |
amend-flag = correlated |
| 38 |
|
| 39 |
[color] |
| 40 |
absorb.description = yellow |
| 41 |
absorb.node = blue bold |
| 42 |
absorb.path = bold |
| 43 |
</pre> |
| 44 |
</div> |
| 45 |
<div class="section" id="commands"> |
| 46 |
<h1><a class="toc-backref" href="#contents">Commands</a></h1> |
| 47 |
<div class="section" id="change-creation"> |
| 48 |
<h2><a class="toc-backref" href="#contents">Change creation</a></h2> |
| 49 |
<div class="section" id="absorb-1"> |
| 50 |
<h3>absorb</h3> |
| 51 |
<p>incorporate corrections into the stack of draft changesets:</p> |
| 52 |
<pre class="literal-block"> |
| 53 |
hg absorb [OPTION] [FILE]... |
| 54 |
</pre> |
| 55 |
<p>absorb analyzes each change in your working directory and attempts to |
| 56 |
amend the changed lines into the changesets in your stack that first |
| 57 |
introduced those lines.</p> |
| 58 |
<p>If absorb cannot find an unambiguous changeset to amend for a change, |
| 59 |
that change will be left in the working directory, untouched. They can be |
| 60 |
observed by <a class="reference external" href="hg-status.html"><tt class="docutils literal">hg status</tt></a> or <a class="reference external" href="hg-diff.html"><tt class="docutils literal">hg diff</tt></a> afterwards. In other words, |
| 61 |
absorb does not write to the working directory.</p> |
| 62 |
<p>Changesets outside the revset <cite>::. and not public() and not merge()</cite> will |
| 63 |
not be changed.</p> |
| 64 |
<p>Changesets that become empty after applying the changes will be deleted.</p> |
| 65 |
<p>By default, absorb will show what it plans to do and prompt for |
| 66 |
confirmation. If you are confident that the changes will be absorbed |
| 67 |
to the correct place, run <a class="reference external" href="hg-absorb.html"><tt class="docutils literal">hg absorb <span class="pre">-a</span></tt></a> to apply the changes |
| 68 |
immediately.</p> |
| 69 |
<p>Returns 0 on success, 1 if all chunks were ignored and nothing amended.</p> |
| 70 |
<p>Options:</p> |
| 71 |
<table class="docutils option-list" frame="void" rules="none"> |
| 72 |
<col class="option" /> |
| 73 |
<col class="description" /> |
| 74 |
<tbody valign="top"> |
| 75 |
<tr><td class="option-group" colspan="2"> |
| 76 |
<kbd><span class="option">-a</span>, <span class="option">--apply-changes</span></kbd></td> |
| 77 |
</tr> |
| 78 |
<tr><td> </td><td>apply changes without prompting for confirmation</td></tr> |
| 79 |
<tr><td class="option-group" colspan="2"> |
| 80 |
<kbd><span class="option">-p</span>, <span class="option">--print-changes</span></kbd></td> |
| 81 |
</tr> |
| 82 |
<tr><td> </td><td>always print which changesets are modified by which changes</td></tr> |
| 83 |
<tr><td class="option-group" colspan="2"> |
| 84 |
<kbd><span class="option">-i</span>, <span class="option">--interactive</span></kbd></td> |
| 85 |
</tr> |
| 86 |
<tr><td> </td><td>interactively select which chunks to apply</td></tr> |
| 87 |
<tr><td class="option-group" colspan="2"> |
| 88 |
<kbd><span class="option">-e</span>, <span class="option">--edit-lines</span></kbd></td> |
| 89 |
</tr> |
| 90 |
<tr><td> </td><td>edit what lines belong to which changesets before commit (EXPERIMENTAL)</td></tr> |
| 91 |
<tr><td class="option-group"> |
| 92 |
<kbd><span class="option">-n</span>, <span class="option">--dry-run</span></kbd></td> |
| 93 |
<td>do not perform actions, just print output</td></tr> |
| 94 |
<tr><td class="option-group" colspan="2"> |
| 95 |
<kbd><span class="option">--style <var><STYLE></var></span></kbd></td> |
| 96 |
</tr> |
| 97 |
<tr><td> </td><td>display using template map file (DEPRECATED)</td></tr> |
| 98 |
<tr><td class="option-group" colspan="2"> |
| 99 |
<kbd><span class="option">-T</span>, <span class="option">--template <var><TEMPLATE></var></span></kbd></td> |
| 100 |
</tr> |
| 101 |
<tr><td> </td><td>display with template</td></tr> |
| 102 |
<tr><td class="option-group" colspan="2"> |
| 103 |
<kbd><span class="option">-I</span>, <span class="option">--include <var><PATTERN[+]></var></span></kbd></td> |
| 104 |
</tr> |
| 105 |
<tr><td> </td><td>include names matching the given patterns</td></tr> |
| 106 |
<tr><td class="option-group" colspan="2"> |
| 107 |
<kbd><span class="option">-X</span>, <span class="option">--exclude <var><PATTERN[+]></var></span></kbd></td> |
| 108 |
</tr> |
| 109 |
<tr><td> </td><td>exclude names matching the given patterns</td></tr> |
| 110 |
</tbody> |
| 111 |
</table> |
| 112 |
<p>[+] marked option can be specified multiple times</p> |
| 113 |
</div> |
| 114 |
</div> |
| 115 |
</div> |
| 116 |
</div> |
| 117 |
</body> |
| 118 |
</html> |