Mercurial > hg
changeset 7276:08dc0152bb5e
help: Refine a bit the help text of "hg update"
Parts of the original text were submitted by Hubert Kauker (Hubert
dot Kauker at travelbasys.de). This is a slightly revised version
of Hubert's original text.
author | Greg Ward <gerg.ward+hg@gmail.com> |
---|---|
date | Mon, 27 Oct 2008 13:38:31 -0400 |
parents | c00cdac22d3c |
children | 3e000e2bf5f6 1f0f84660dea |
files | mercurial/commands.py |
diffstat | 1 files changed, 15 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Mon Oct 27 19:39:41 2008 +0100 +++ b/mercurial/commands.py Mon Oct 27 13:38:31 2008 -0400 @@ -2857,14 +2857,21 @@ or the tip of the current branch if none is specified. Use null as the revision to remove the working copy (like 'hg clone -U'). - If the requested revision is a descendant of the working - directory, any outstanding changes in the working directory will - be merged into the result. If it is not directly descended but is - on the same named branch, update aborts with a suggestion to use - merge or update -C instead. - - If the requested revision is on a different named branch and the - working directory is clean, update quietly switches branches. + When the working dir contains no uncommitted changes, it will be + replaced by the state of the requested revision from the repo. When + the requested revision is on a different branch, the working dir + will additionally be switched to that branch. + + When there are uncommitted changes, use option -C to discard them, + forcibly replacing the state of the working dir with the requested + revision. + + When there are uncommitted changes and option -C is not used, and + the parent revision and requested revision are on the same branch, + and one of them is an ancestor of the other, then the new working + directory will contain the requested revision merged with the + uncommitted changes. Otherwise, the update will fail with a + suggestion to use 'merge' or 'update -C' instead. If you want to update just one file to an older revision, use revert.