Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 6375:cdc458b12f0f
update: better logic and messages for updates
- complain about attempts to merge with ancestor
- when updating, differentiate between
- crossing named branches with no local changes (jump)
- crossing named branches with local changes (complain)
- nonlinear update on the same named branch, no changes (complain some more)
- nonlinear update on the same named branch, changes (different complaining)
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 24 Mar 2008 10:01:05 -0500 |
parents | 53912d30ac40 |
children | 0d4e068e9e52 |
line wrap: on
line diff
--- a/mercurial/commands.py Mon Mar 24 16:20:15 2008 +0100 +++ b/mercurial/commands.py Mon Mar 24 10:01:05 2008 -0500 @@ -2764,17 +2764,17 @@ Update the working directory to the specified revision, or the tip of the current branch if none is specified. - See 'hg help dates' for a list of formats valid for -d/--date. - - If there are no outstanding changes in the working directory, the - result is the requested version. - - If the requested version is a descendant of the working directory - and there are outstanding changes, those changes will be merged - into the result. - - By default, update will refuse to run if there are outstanding - changes and the update spans branches. + + 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. + + See 'hg help dates' for a list of formats valid for --date. """ if rev and node: raise util.Abort(_("please specify just one revision"))