.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 \ . tipmost revision matching date .TP .BI \-r, \-\-rev \ . revision .TP .BI \-t, \-\-tool \ . specify merge tool .UNINDENT .SH ALIASES .sp .nf .ft C up, checkout, co .ft P .fi .\" Generated by docutils manpage writer. .\" .