[PATCH] commit: explain basics in help text

Matt Mackall mpm at selenic.com
Wed Jul 18 18:06:41 CDT 2012


On Sat, 2012-07-14 at 12:45 +0200, Adrian Buehlmann wrote:
> # HG changeset patch
> # User Adrian Buehlmann <adrian at cadifra.com>
> # Date 1342262730 -7200
> # Node ID cad9193da3386127df17a2cfe558ce5f97bd6566
> # Parent  8299a9ad48dd46ca7ce5a405f06fa2dd16f1b236
> commit: explain basics in help text


> If we explain the details about more complex concepts like --amend (using
> notions like "parent"), we should probably first explain the basics.

While I generally think this text is good, I think it's too verbose for
it to all be in the default display. We either need to hide some of it
or hide/remove/consolidate some of the existing text.


> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -1221,6 +1221,23 @@
>      centralized SCM, this operation is a local operation. See
>      :hg:`push` for a way to actively distribute your changes.
>  
> +    Commit creates a new changeset which gets the parent revision of
> +    the working directory as its parent changeset, or two parent
> +    revisions, if the working directory contains an uncommitted merge
> +    (use :hg:`parents` to see the parent revisions).

This probably wants to be the first paragraph and can probably be
simplified by using "parent revision(s)" or similar. 'summary' is the
new 'parents'.

> +    The newly created changeset will be set as the new parent revision
> +    of the working directory (see the update command for switching the
> +    parent revision of the working directory).

Combine with above. "See also" text should generally be at the end.

> +    If you instead want to revert just one file, use :hg:`revert NAME`
> +    or :hg:`revert --all` to revert all files to the contents they had
> +    in the parent revision of the working directory.

Relevance to commit is pretty tenuous.

> +    To cancel an uncommitted merge (and lose all your changes), use
> +    :hg:`update --clean .` ("." denotes the first parent revision of the
> +    working directory, see :hg:`help revisions`).

Again, pretty tenuous relation to commit, and not specific to merges.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list