Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 42244:0f01394457a0
commit: add ability to print file status after each successful invocation
When commands.commit.post-status is enabled, `hg commit` will effectively run
`hg status -mardu` after committing. It can help catch mistakes like not
committing all needed files or not adding unknown files that should've been
part of the just created commit.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 03 May 2019 14:11:16 +0800 |
parents | 8d14d91584f1 |
children | 96bc1ef4a302 |
comparison
equal
deleted
inserted
replaced
42243:165b1aad43da | 42244:0f01394457a0 |
---|---|
1733 ui.status(_("nothing changed\n")) | 1733 ui.status(_("nothing changed\n")) |
1734 return 1 | 1734 return 1 |
1735 | 1735 |
1736 cmdutil.commitstatus(repo, node, branch, bheads, opts) | 1736 cmdutil.commitstatus(repo, node, branch, bheads, opts) |
1737 | 1737 |
1738 if not ui.quiet and ui.configbool('commands', 'commit.post-status'): | |
1739 status(ui, repo, modified=True, added=True, removed=True, deleted=True, | |
1740 unknown=True, subrepos=opts.get('subrepos')) | |
1741 | |
1738 @command('config|showconfig|debugconfig', | 1742 @command('config|showconfig|debugconfig', |
1739 [('u', 'untrusted', None, _('show untrusted configuration options')), | 1743 [('u', 'untrusted', None, _('show untrusted configuration options')), |
1740 ('e', 'edit', None, _('edit user config')), | 1744 ('e', 'edit', None, _('edit user config')), |
1741 ('l', 'local', None, _('edit repository config')), | 1745 ('l', 'local', None, _('edit repository config')), |
1742 ('g', 'global', None, _('edit global config'))] + formatteropts, | 1746 ('g', 'global', None, _('edit global config'))] + formatteropts, |