Mercurial > hg
comparison hgext/churn.py @ 32375:04baab18d60a
commands: move templates of common command options to cmdutil (API)
The goal is to get rid of the debugcommands -> commands dependency.
Since globalopts is the property of the commands, it's kept in the commands
module.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 14 May 2017 16:19:47 +0900 |
parents | 46ba2cdda476 |
children | 50586a0a946f |
comparison
equal
deleted
inserted
replaced
32374:194b0f781132 | 32375:04baab18d60a |
---|---|
15 import time | 15 import time |
16 | 16 |
17 from mercurial.i18n import _ | 17 from mercurial.i18n import _ |
18 from mercurial import ( | 18 from mercurial import ( |
19 cmdutil, | 19 cmdutil, |
20 commands, | |
21 encoding, | 20 encoding, |
22 patch, | 21 patch, |
23 registrar, | 22 registrar, |
24 scmutil, | 23 scmutil, |
25 util, | 24 util, |
113 _('strftime-compatible format for grouping by date'), _('FORMAT')), | 112 _('strftime-compatible format for grouping by date'), _('FORMAT')), |
114 ('c', 'changesets', False, _('count rate by number of changesets')), | 113 ('c', 'changesets', False, _('count rate by number of changesets')), |
115 ('s', 'sort', False, _('sort by key (default: sort by count)')), | 114 ('s', 'sort', False, _('sort by key (default: sort by count)')), |
116 ('', 'diffstat', False, _('display added/removed lines separately')), | 115 ('', 'diffstat', False, _('display added/removed lines separately')), |
117 ('', 'aliases', '', _('file with email aliases'), _('FILE')), | 116 ('', 'aliases', '', _('file with email aliases'), _('FILE')), |
118 ] + commands.walkopts, | 117 ] + cmdutil.walkopts, |
119 _("hg churn [-d DATE] [-r REV] [--aliases FILE] [FILE]"), | 118 _("hg churn [-d DATE] [-r REV] [--aliases FILE] [FILE]"), |
120 inferrepo=True) | 119 inferrepo=True) |
121 def churn(ui, repo, *pats, **opts): | 120 def churn(ui, repo, *pats, **opts): |
122 '''histogram of changes to the repository | 121 '''histogram of changes to the repository |
123 | 122 |