| 1 |
.TH HG REVERT "" "" "" |
| 2 |
.SH NAME |
| 3 |
hg revert \- restore files to their checkout state |
| 4 |
.\" Man page generated from reStructuredText. |
| 5 |
. |
| 6 |
.SH SYNOPSIS |
| 7 |
.sp |
| 8 |
.nf |
| 9 |
.ft C |
| 10 |
hg revert [OPTION]... [\-r REV] [NAME]... |
| 11 |
.ft P |
| 12 |
.fi |
| 13 |
.SH DESCRIPTION |
| 14 |
.IP Note |
| 15 |
. |
| 16 |
To check out earlier revisions, you should use \%\fBhg update REV\fP\:. |
| 17 |
To cancel an uncommitted merge (and lose your changes), |
| 18 |
use \%\fBhg merge \-\-abort\fP\:. |
| 19 |
.RE |
| 20 |
.sp |
| 21 |
With no revision specified, revert the specified files or directories |
| 22 |
to the contents they had in the parent of the working directory. |
| 23 |
This restores the contents of files to an unmodified |
| 24 |
state and unschedules adds, removes, copies, and renames. If the |
| 25 |
working directory has two parents, you must explicitly specify a |
| 26 |
revision. |
| 27 |
.sp |
| 28 |
Using the \-r/\-\-rev or \-d/\-\-date options, revert the given files or |
| 29 |
directories to their states as of a specific revision. Because |
| 30 |
revert does not change the working directory parents, this will |
| 31 |
cause these files to appear modified. This can be helpful to "back |
| 32 |
out" some or all of an earlier change. See \%\fBhg backout\fP\: for a |
| 33 |
related method. |
| 34 |
.sp |
| 35 |
Modified files are saved with a .orig suffix before reverting. |
| 36 |
To disable these backups, use \-\-no\-backup. It is possible to store |
| 37 |
the backup files in a custom directory relative to the root of the |
| 38 |
repository by setting the \fBui.origbackuppath\fP configuration |
| 39 |
option. |
| 40 |
.sp |
| 41 |
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date. |
| 42 |
.sp |
| 43 |
See \%\fBhg help backout\fP\: for a way to reverse the effect of an |
| 44 |
earlier changeset. |
| 45 |
.sp |
| 46 |
Returns 0 on success. |
| 47 |
.SH OPTIONS |
| 48 |
.INDENT 0.0 |
| 49 |
.TP |
| 50 |
.B \-a, \-\-all |
| 51 |
. |
| 52 |
revert all changes when no arguments given |
| 53 |
.TP |
| 54 |
.BI \-d, \-\-date \ <DATE> |
| 55 |
. |
| 56 |
tipmost revision matching date |
| 57 |
.TP |
| 58 |
.BI \-r, \-\-rev \ <REV> |
| 59 |
. |
| 60 |
revert to the specified revision |
| 61 |
.TP |
| 62 |
.B \-C, \-\-no\-backup |
| 63 |
. |
| 64 |
do not save backup copies of files |
| 65 |
.TP |
| 66 |
.B \-i, \-\-interactive |
| 67 |
. |
| 68 |
interactively select the changes |
| 69 |
.TP |
| 70 |
.BI \-I, \-\-include \ <PATTERN[+]> |
| 71 |
. |
| 72 |
include names matching the given patterns |
| 73 |
.TP |
| 74 |
.BI \-X, \-\-exclude \ <PATTERN[+]> |
| 75 |
. |
| 76 |
exclude names matching the given patterns |
| 77 |
.TP |
| 78 |
.B \-n, \-\-dry\-run |
| 79 |
. |
| 80 |
do not perform actions, just print output |
| 81 |
.UNINDENT |
| 82 |
.sp |
| 83 |
[+] marked option can be specified multiple times |
| 84 |
.\" Generated by docutils manpage writer. |
| 85 |
.\" |
| 86 |
. |