| 1 |
.TH HG UPDATE "" "" "" |
| 2 |
.SH NAME |
| 3 |
hg update \- update working directory (or switch revisions) |
| 4 |
.\" Man page generated from reStructuredText. |
| 5 |
. |
| 6 |
.SH SYNOPSIS |
| 7 |
.sp |
| 8 |
.nf |
| 9 |
.ft C |
| 10 |
hg update [\-C|\-c|\-m] [\-d DATE] [[\-r] REV] |
| 11 |
.ft P |
| 12 |
.fi |
| 13 |
.SH DESCRIPTION |
| 14 |
.sp |
| 15 |
Update the repository\(aqs working directory to the specified |
| 16 |
changeset. If no changeset is specified, update to the tip of the |
| 17 |
current named branch and move the active bookmark (see \%\fBhg help |
| 18 |
bookmarks\fP\:). |
| 19 |
.sp |
| 20 |
Update sets the working directory\(aqs parent revision to the specified |
| 21 |
changeset (see \%\fBhg help parents\fP\:). |
| 22 |
.sp |
| 23 |
If the changeset is not a descendant or ancestor of the working |
| 24 |
directory\(aqs parent and there are uncommitted changes, the update is |
| 25 |
aborted. With the \-c/\-\-check option, the working directory is checked |
| 26 |
for uncommitted changes; if none are found, the working directory is |
| 27 |
updated to the specified changeset. |
| 28 |
.sp |
| 29 |
The \-C/\-\-clean, \-c/\-\-check, and \-m/\-\-merge options control what |
| 30 |
happens if the working directory contains uncommitted changes. |
| 31 |
At most of one of them can be specified. |
| 32 |
.INDENT 0.0 |
| 33 |
.IP 1. 3 |
| 34 |
. |
| 35 |
If no option is specified, and if |
| 36 |
the requested changeset is an ancestor or descendant of |
| 37 |
the working directory\(aqs parent, the uncommitted changes |
| 38 |
are merged into the requested changeset and the merged |
| 39 |
result is left uncommitted. If the requested changeset is |
| 40 |
not an ancestor or descendant (that is, it is on another |
| 41 |
branch), the update is aborted and the uncommitted changes |
| 42 |
are preserved. |
| 43 |
.IP 2. 3 |
| 44 |
. |
| 45 |
With the \-m/\-\-merge option, the update is allowed even if the |
| 46 |
requested changeset is not an ancestor or descendant of |
| 47 |
the working directory\(aqs parent. |
| 48 |
.IP 3. 3 |
| 49 |
. |
| 50 |
With the \-c/\-\-check option, the update is aborted and the |
| 51 |
uncommitted changes are preserved. |
| 52 |
.IP 4. 3 |
| 53 |
. |
| 54 |
With the \-C/\-\-clean option, uncommitted changes are discarded and |
| 55 |
the working directory is updated to the requested changeset. |
| 56 |
.UNINDENT |
| 57 |
.sp |
| 58 |
To cancel an uncommitted merge (and lose your changes), use |
| 59 |
\%\fBhg merge \-\-abort\fP\:. |
| 60 |
.sp |
| 61 |
Use null as the changeset to remove the working directory (like |
| 62 |
\%\fBhg clone \-U\fP\:). |
| 63 |
.sp |
| 64 |
If you want to revert just one file to an older revision, use |
| 65 |
\%\fBhg revert [\-r REV] NAME\fP\:. |
| 66 |
.sp |
| 67 |
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date. |
| 68 |
.sp |
| 69 |
Returns 0 on success, 1 if there are unresolved files. |
| 70 |
.SH OPTIONS |
| 71 |
.INDENT 0.0 |
| 72 |
.TP |
| 73 |
.B \-C, \-\-clean |
| 74 |
. |
| 75 |
discard uncommitted changes (no backup) |
| 76 |
.TP |
| 77 |
.B \-c, \-\-check |
| 78 |
. |
| 79 |
require clean working directory |
| 80 |
.TP |
| 81 |
.B \-m, \-\-merge |
| 82 |
. |
| 83 |
merge uncommitted changes |
| 84 |
.TP |
| 85 |
.BI \-d, \-\-date \ <DATE> |
| 86 |
. |
| 87 |
tipmost revision matching date |
| 88 |
.TP |
| 89 |
.BI \-r, \-\-rev \ <REV> |
| 90 |
. |
| 91 |
revision |
| 92 |
.TP |
| 93 |
.BI \-t, \-\-tool \ <TOOL> |
| 94 |
. |
| 95 |
specify merge tool |
| 96 |
.UNINDENT |
| 97 |
.SH ALIASES |
| 98 |
.sp |
| 99 |
.nf |
| 100 |
.ft C |
| 101 |
up, checkout, co |
| 102 |
.ft P |
| 103 |
.fi |
| 104 |
.\" Generated by docutils manpage writer. |
| 105 |
.\" |
| 106 |
. |