changeset 27242:58f473908951

commit: add some help examples (issue4963) Includes documenting --date now, which resolves the above issue.
author Augie Fackler <augie@google.com>
date Fri, 04 Dec 2015 15:24:05 -0500
parents ead8e7069998
children 3abee2ba27af
files mercurial/commands.py
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Dec 04 11:39:03 2015 -0500
+++ b/mercurial/commands.py	Fri Dec 04 15:24:05 2015 -0500
@@ -1585,6 +1585,22 @@
     See :hg:`help dates` for a list of formats valid for -d/--date.
 
     Returns 0 on success, 1 if nothing changed.
+
+    .. container:: verbose
+
+      Examples:
+
+      - commit all files ending in .py:
+
+          hg commit --include 'set:**.py'
+
+      - commit all non-binary files:
+
+          hg commit --exclude 'set:binary()'
+
+      - amend the current commit and set the date to now:
+
+          hg commit --amend --date now
     """
     wlock = lock = None
     try: