Debian Codegraph @

doc/html/hg-rollback.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 rollback</title>
8 <link rel="stylesheet" href="../style.css" type="text/css" />
9 </head>
10 <body>
11 <div class="document" id="hg-rollback">
12 <span id="hg-rollback-1"></span>
13 <h1 class="title">hg rollback</h1>
14 <h2 class="subtitle" id="roll-back-the-last-transaction-dangerous-deprecated">roll back the last transaction (DANGEROUS) (DEPRECATED)</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 rollback
28 </pre>
29 </div>
30 <div class="section" id="description">
31 <h1><a class="toc-backref" href="#contents">Description</a></h1>
32 <p>Please use <a class="reference external" href="hg-commit.html"><tt class="docutils literal">hg commit <span class="pre">--amend</span></tt></a> instead of rollback to correct
33 mistakes in the last commit.</p>
34 <p>This command should be used with care. There is only one level of
35 rollback, and there is no way to undo a rollback. It will also
36 restore the dirstate at the time of the last transaction, losing
37 any dirstate changes since that time. This command does not alter
38 the working directory.</p>
39 <p>Transactions are used to encapsulate the effects of all commands
40 that create new changesets or propagate existing changesets into a
41 repository.</p>
42 <div class="verbose docutils container">
43 <p>For example, the following commands are transactional, and their
44 effects can be rolled back:</p>
45 <ul class="simple">
46 <li>commit</li>
47 <li>import</li>
48 <li>pull</li>
49 <li>push (with this repository as the destination)</li>
50 <li>unbundle</li>
51 </ul>
52 <p>To avoid permanent data loss, rollback will refuse to rollback a
53 commit transaction if it isn't checked out. Use --force to
54 override this protection.</p>
55 <p>The rollback command can be entirely disabled by setting the
56 <tt class="docutils literal">ui.rollback</tt> configuration setting to false. If you're here
57 because you want to use rollback and it's disabled, you can
58 re-enable the command by setting <tt class="docutils literal">ui.rollback</tt> to true.</p>
59 </div>
60 <p>This command is not intended for use on public repositories. Once
61 changes are visible for pull by other users, rolling a transaction
62 back locally is ineffective (someone else may already have pulled
63 the changes). Furthermore, a race is possible with readers of the
64 repository; for example an in-progress pull from the repository
65 may fail if a rollback is performed.</p>
66 <p>Returns 0 on success, 1 if no rollback data is available.</p>
67 </div>
68 <div class="section" id="options">
69 <h1><a class="toc-backref" href="#contents">Options</a></h1>
70 <table class="docutils option-list" frame="void" rules="none">
71 <col class="option" />
72 <col class="description" />
73 <tbody valign="top">
74 <tr><td class="option-group">
75 <kbd><span class="option">-n</span>, <span class="option">--dry-run</span></kbd></td>
76 <td>do not perform actions, just print output</td></tr>
77 <tr><td class="option-group">
78 <kbd><span class="option">-f</span>, <span class="option">--force</span></kbd></td>
79 <td>ignore safety measures</td></tr>
80 </tbody>
81 </table>
82 </div>
83 </div>
84 </body>
85 </html>