# HG changeset patch # User Augie Fackler # Date 2015-12-04 20:24:05 # Node ID 58f473908951593e5934e31d4481ef4ee0b66d9f # Parent ead8e7069998facb70245cc387bd066591036c9d commit: add some help examples (issue4963) Includes documenting --date now, which resolves the above issue. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1585,6 +1585,22 @@ def commit(ui, repo, *pats, **opts): 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: