Debian Codegraph @

doc/html/hg-backout.html

raw
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>hg backout</title>
8 <link rel="stylesheet" href="../style.css" type="text/css" />
9 </head>
10 <body>
11 <div class="document" id="hg-backout">
12 <span id="hg-backout-1"></span>
13 <h1 class="title">hg backout</h1>
14 <h2 class="subtitle" id="reverse-effect-of-earlier-changeset">reverse effect of earlier changeset</h2>
15
16 <div class="contents htmlonly topic" id="contents">
17 <p class="topic-title"><a class="reference internal" href="#top">Contents</a></p>
18 <ul class="simple">
19 <li><a class="reference internal" href="#synopsis" id="toc-entry-1">Synopsis</a></li>
20 <li><a class="reference internal" href="#description" id="toc-entry-2">Description</a></li>
21 <li><a class="reference internal" href="#options" id="toc-entry-3">Options</a></li>
22 </ul>
23 </div>
24 <div class="section" id="synopsis">
25 <h1><a class="toc-backref" href="#contents">Synopsis</a></h1>
26 <pre class="literal-block">
27 hg backout [OPTION]... [-r] REV
28 </pre>
29 </div>
30 <div class="section" id="description">
31 <h1><a class="toc-backref" href="#contents">Description</a></h1>
32 <p>Prepare a new changeset with the effect of REV undone in the
33 current working directory. If no conflicts were encountered,
34 it will be committed immediately.</p>
35 <p>If REV is the parent of the working directory, then this new changeset
36 is committed automatically (unless --no-commit is specified).</p>
37 <div class="admonition note">
38 <p class="first admonition-title">Note</p>
39 <p class="last"><a class="reference external" href="hg-backout.html"><tt class="docutils literal">hg backout</tt></a> cannot be used to fix either an unwanted or
40 incorrect merge.</p>
41 </div>
42 <div class="verbose docutils container">
43 <p>Examples:</p>
44 <ul>
45 <li><p class="first">Reverse the effect of the parent of the working directory.
46 This backout will be committed immediately:</p>
47 <pre class="literal-block">
48 hg backout -r .
49 </pre>
50 </li>
51 <li><p class="first">Reverse the effect of previous bad revision 23:</p>
52 <pre class="literal-block">
53 hg backout -r 23
54 </pre>
55 </li>
56 <li><p class="first">Reverse the effect of previous bad revision 23 and
57 leave changes uncommitted:</p>
58 <pre class="literal-block">
59 hg backout -r 23 --no-commit
60 hg commit -m &quot;Backout revision 23&quot;
61 </pre>
62 </li>
63 </ul>
64 <p>By default, the pending changeset will have one parent,
65 maintaining a linear history. With --merge, the pending
66 changeset will instead have two parents: the old parent of the
67 working directory and a new child of REV that simply undoes REV.</p>
68 <p>Before version 1.7, the behavior without --merge was equivalent
69 to specifying --merge followed by <a class="reference external" href="hg-update.html"><tt class="docutils literal">hg update <span class="pre">--clean</span> .</tt></a> to
70 cancel the merge and leave the child of REV as a head to be
71 merged separately.</p>
72 </div>
73 <p>See <a class="reference external" href="topic-dates.html"><tt class="docutils literal">hg help dates</tt></a> for a list of formats valid for -d/--date.</p>
74 <p>See <a class="reference external" href="hg-revert.html"><tt class="docutils literal">hg help revert</tt></a> for a way to restore files to the state
75 of another revision.</p>
76 <p>Returns 0 on success, 1 if nothing to backout or there are unresolved
77 files.</p>
78 </div>
79 <div class="section" id="options">
80 <h1><a class="toc-backref" href="#contents">Options</a></h1>
81 <table class="docutils option-list" frame="void" rules="none">
82 <col class="option" />
83 <col class="description" />
84 <tbody valign="top">
85 <tr><td class="option-group">
86 <kbd><span class="option">--merge</span></kbd></td>
87 <td>merge with old dirstate parent after backout</td></tr>
88 <tr><td class="option-group">
89 <kbd><span class="option">--commit</span></kbd></td>
90 <td>commit if no conflicts were encountered (DEPRECATED)</td></tr>
91 <tr><td class="option-group">
92 <kbd><span class="option">--no-commit</span></kbd></td>
93 <td>do not commit</td></tr>
94 <tr><td class="option-group">
95 <kbd><span class="option">--parent <var>&lt;REV&gt;</var></span></kbd></td>
96 <td>parent to choose when backing out merge (DEPRECATED)</td></tr>
97 <tr><td class="option-group" colspan="2">
98 <kbd><span class="option">-r</span>, <span class="option">--rev <var>&lt;REV&gt;</var></span></kbd></td>
99 </tr>
100 <tr><td>&nbsp;</td><td>revision to backout</td></tr>
101 <tr><td class="option-group">
102 <kbd><span class="option">-e</span>, <span class="option">--edit</span></kbd></td>
103 <td>invoke editor on commit messages</td></tr>
104 <tr><td class="option-group" colspan="2">
105 <kbd><span class="option">-t</span>, <span class="option">--tool <var>&lt;TOOL&gt;</var></span></kbd></td>
106 </tr>
107 <tr><td>&nbsp;</td><td>specify merge tool</td></tr>
108 <tr><td class="option-group" colspan="2">
109 <kbd><span class="option">-I</span>, <span class="option">--include <var>&lt;PATTERN[+]&gt;</var></span></kbd></td>
110 </tr>
111 <tr><td>&nbsp;</td><td>include names matching the given patterns</td></tr>
112 <tr><td class="option-group" colspan="2">
113 <kbd><span class="option">-X</span>, <span class="option">--exclude <var>&lt;PATTERN[+]&gt;</var></span></kbd></td>
114 </tr>
115 <tr><td>&nbsp;</td><td>exclude names matching the given patterns</td></tr>
116 <tr><td class="option-group" colspan="2">
117 <kbd><span class="option">-m</span>, <span class="option">--message <var>&lt;TEXT&gt;</var></span></kbd></td>
118 </tr>
119 <tr><td>&nbsp;</td><td>use text as commit message</td></tr>
120 <tr><td class="option-group" colspan="2">
121 <kbd><span class="option">-l</span>, <span class="option">--logfile <var>&lt;FILE&gt;</var></span></kbd></td>
122 </tr>
123 <tr><td>&nbsp;</td><td>read commit message from file</td></tr>
124 <tr><td class="option-group" colspan="2">
125 <kbd><span class="option">-d</span>, <span class="option">--date <var>&lt;DATE&gt;</var></span></kbd></td>
126 </tr>
127 <tr><td>&nbsp;</td><td>record the specified date as commit date</td></tr>
128 <tr><td class="option-group" colspan="2">
129 <kbd><span class="option">-u</span>, <span class="option">--user <var>&lt;USER&gt;</var></span></kbd></td>
130 </tr>
131 <tr><td>&nbsp;</td><td>record the specified user as committer</td></tr>
132 </tbody>
133 </table>
134 <p>[+] marked option can be specified multiple times</p>
135 </div>
136 </div>
137 </body>
138 </html>