[PATCH] expand and clarify help for update

Andrei Vermel avermel at mail.ru
Thu Oct 30 10:28:18 UTC 2008


I think the current help text for 'update'  is too many words.
It requires reading into it, it's hard to make sense at a glance.

> When the working dir contains no uncommitted changes, it will be
> replaced by the state of the requested revision from the repo.
Does this need to be said? Seems evident enough to me.

> 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.

This seems much too long, and too much duplication.
Something like this might be clearer:

"Uncommitted changes get merged if parent and requested revisions
are on the same branch and one is an ancestor of the other.
Otherwise update will fail. Use option -C to discard the changes."

Andrei




More information about the Mercurial mailing list