| 1 |
.TH HG ROLLBACK "" "" "" |
| 2 |
.SH NAME |
| 3 |
hg rollback \- roll back the last transaction (DANGEROUS) (DEPRECATED) |
| 4 |
.\" Man page generated from reStructuredText. |
| 5 |
. |
| 6 |
.SH SYNOPSIS |
| 7 |
.sp |
| 8 |
.nf |
| 9 |
.ft C |
| 10 |
hg rollback |
| 11 |
.ft P |
| 12 |
.fi |
| 13 |
.SH DESCRIPTION |
| 14 |
.sp |
| 15 |
Please use \%\fBhg commit \-\-amend\fP\: instead of rollback to correct |
| 16 |
mistakes in the last commit. |
| 17 |
.sp |
| 18 |
This command should be used with care. There is only one level of |
| 19 |
rollback, and there is no way to undo a rollback. It will also |
| 20 |
restore the dirstate at the time of the last transaction, losing |
| 21 |
any dirstate changes since that time. This command does not alter |
| 22 |
the working directory. |
| 23 |
.sp |
| 24 |
Transactions are used to encapsulate the effects of all commands |
| 25 |
that create new changesets or propagate existing changesets into a |
| 26 |
repository. |
| 27 |
.sp |
| 28 |
For example, the following commands are transactional, and their |
| 29 |
effects can be rolled back: |
| 30 |
.INDENT 0.0 |
| 31 |
.IP \(bu 2 |
| 32 |
. |
| 33 |
commit |
| 34 |
.IP \(bu 2 |
| 35 |
. |
| 36 |
import |
| 37 |
.IP \(bu 2 |
| 38 |
. |
| 39 |
pull |
| 40 |
.IP \(bu 2 |
| 41 |
. |
| 42 |
push (with this repository as the destination) |
| 43 |
.IP \(bu 2 |
| 44 |
. |
| 45 |
unbundle |
| 46 |
.UNINDENT |
| 47 |
.sp |
| 48 |
To avoid permanent data loss, rollback will refuse to rollback a |
| 49 |
commit transaction if it isn\(aqt checked out. Use \-\-force to |
| 50 |
override this protection. |
| 51 |
.sp |
| 52 |
The rollback command can be entirely disabled by setting the |
| 53 |
\fBui.rollback\fP configuration setting to false. If you\(aqre here |
| 54 |
because you want to use rollback and it\(aqs disabled, you can |
| 55 |
re\-enable the command by setting \fBui.rollback\fP to true. |
| 56 |
.sp |
| 57 |
This command is not intended for use on public repositories. Once |
| 58 |
changes are visible for pull by other users, rolling a transaction |
| 59 |
back locally is ineffective (someone else may already have pulled |
| 60 |
the changes). Furthermore, a race is possible with readers of the |
| 61 |
repository; for example an in\-progress pull from the repository |
| 62 |
may fail if a rollback is performed. |
| 63 |
.sp |
| 64 |
Returns 0 on success, 1 if no rollback data is available. |
| 65 |
.SH OPTIONS |
| 66 |
.INDENT 0.0 |
| 67 |
.TP |
| 68 |
.B \-n, \-\-dry\-run |
| 69 |
. |
| 70 |
do not perform actions, just print output |
| 71 |
.TP |
| 72 |
.B \-f, \-\-force |
| 73 |
. |
| 74 |
ignore safety measures |
| 75 |
.UNINDENT |
| 76 |
.\" Generated by docutils manpage writer. |
| 77 |
.\" |
| 78 |
. |