comparison mercurial/commands.py @ 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 ccae1588117f
children be7ef03d7fb6
comparison
equal deleted inserted replaced
27241:ead8e7069998 27242:58f473908951
1583 or changesets that have children. 1583 or changesets that have children.
1584 1584
1585 See :hg:`help dates` for a list of formats valid for -d/--date. 1585 See :hg:`help dates` for a list of formats valid for -d/--date.
1586 1586
1587 Returns 0 on success, 1 if nothing changed. 1587 Returns 0 on success, 1 if nothing changed.
1588
1589 .. container:: verbose
1590
1591 Examples:
1592
1593 - commit all files ending in .py:
1594
1595 hg commit --include 'set:**.py'
1596
1597 - commit all non-binary files:
1598
1599 hg commit --exclude 'set:binary()'
1600
1601 - amend the current commit and set the date to now:
1602
1603 hg commit --amend --date now
1588 """ 1604 """
1589 wlock = lock = None 1605 wlock = lock = None
1590 try: 1606 try:
1591 wlock = repo.wlock() 1607 wlock = repo.wlock()
1592 lock = repo.lock() 1608 lock = repo.lock()