[PATCH 3 of 3] help: describe new cross-branch behavior in update help text, plus cleanups

Faheem Mitha faheem at email.unc.edu
Wed Nov 4 16:18:02 CST 2009


On Wed, 04 Nov 2009 05:50:55 -0000, Stuart W Marks <smarks at smarks.org> wrote:
> # HG changeset patch
> # User Stuart W Marks <smarks at smarks.org>
> # Date 1257310531 28800
> # Node ID 5ad429e692a45438387d0ed5a61280a7c8eed717
> # Parent  2f19c99059767035ebeeb1d0353b7da66ce974b0
> help: describe new cross-branch behavior in update help text, plus cleanups
>
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -3120,30 +3120,33 @@
>      """update working directory
>  
>      Update the repository's working directory to the specified
> -    revision, or the tip of the current branch if none is specified.
> -    Use null as the revision to remove the working copy (like 'hg
> +    revision.
> +
> +    If no revision is specified, attempt to update to the head of the
> +    current branch. If this head is a descendant of the working
> +    directory's parent, update to it, otherwise abort.
> +
> +    The following rules apply when the working directory contains
> +    uncommitted changes:
> +    
> +    1. If neither -c/--check nor -C/--clean is specified, uncommitted
> +    changes are merged into the requested revision, and the merged result
> +    is left uncommitted. Updating and merging will occur only if the
> +    requested revision is an ancestor or descendant of the parent
> +    revision. Otherwise, the update is aborted and the uncommitted changes
> +    are preserved.

This para could use a little rearrangement, IMO. In the first sentence
you say merging happens, in the next sentence you say it only happens
in the linear case.

                                                       Regards, Faheem.



More information about the Mercurial-devel mailing list