[PATCH] commit: explain basics in help text
Adrian Buehlmann
adrian at cadifra.com
Sat Jul 14 05:45:43 CDT 2012
# 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.
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).
+
+ 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).
+
+ 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.
+
+ 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`).
+
If a list of files is omitted, all changes reported by :hg:`status`
will be committed.
More information about the Mercurial-devel
mailing list