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