Contents
hg update [-C|-c|-m] [-d DATE] [[-r] REV]
Update the repository's 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 hg help bookmarks).
Update sets the working directory's parent revision to the specified changeset (see hg help parents).
If the changeset is not a descendant or ancestor of the working directory's 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.
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.
To cancel an uncommitted merge (and lose your changes), use hg merge --abort.
Use null as the changeset to remove the working directory (like hg clone -U).
If you want to revert just one file to an older revision, use hg revert [-r REV] NAME.
See hg help dates for a list of formats valid for -d/--date.
Returns 0 on success, 1 if there are unresolved files.
-C, --clean | discard uncommitted changes (no backup) |
-c, --check | require clean working directory |
-m, --merge | merge uncommitted changes |
-d, --date <DATE> | |
tipmost revision matching date | |
-r, --rev <REV> | |
revision | |
-t, --tool <TOOL> | |
specify merge tool |
up, checkout, co