Show More
@@ -14,6 +14,8 from mercurial import encoding | |||||
14 | import os |
|
14 | import os | |
15 | import time, datetime |
|
15 | import time, datetime | |
16 |
|
16 | |||
|
17 | cmdtable = {} | |||
|
18 | command = cmdutil.command(cmdtable) | |||
17 | testedwith = 'internal' |
|
19 | testedwith = 'internal' | |
18 |
|
20 | |||
19 | def maketemplater(ui, repo, tmpl): |
|
21 | def maketemplater(ui, repo, tmpl): | |
@@ -88,6 +90,21 def countrate(ui, repo, amap, *pats, **o | |||||
88 | return rate |
|
90 | return rate | |
89 |
|
91 | |||
90 |
|
92 | |||
|
93 | @command('churn', | |||
|
94 | [('r', 'rev', [], | |||
|
95 | _('count rate for the specified revision or range'), _('REV')), | |||
|
96 | ('d', 'date', '', | |||
|
97 | _('count rate for revisions matching date spec'), _('DATE')), | |||
|
98 | ('t', 'template', '{author|email}', | |||
|
99 | _('template to group changesets'), _('TEMPLATE')), | |||
|
100 | ('f', 'dateformat', '', | |||
|
101 | _('strftime-compatible format for grouping by date'), _('FORMAT')), | |||
|
102 | ('c', 'changesets', False, _('count rate by number of changesets')), | |||
|
103 | ('s', 'sort', False, _('sort by key (default: sort by count)')), | |||
|
104 | ('', 'diffstat', False, _('display added/removed lines separately')), | |||
|
105 | ('', 'aliases', '', _('file with email aliases'), _('FILE')), | |||
|
106 | ] + commands.walkopts, | |||
|
107 | _("hg churn [-d DATE] [-r REV] [--aliases FILE] [FILE]")) | |||
91 | def churn(ui, repo, *pats, **opts): |
|
108 | def churn(ui, repo, *pats, **opts): | |
92 | '''histogram of changes to the repository |
|
109 | '''histogram of changes to the repository | |
93 |
|
110 | |||
@@ -181,25 +198,4 def churn(ui, repo, *pats, **opts): | |||||
181 | for name, count in rate: |
|
198 | for name, count in rate: | |
182 | ui.write(format(name, count)) |
|
199 | ui.write(format(name, count)) | |
183 |
|
200 | |||
184 |
|
||||
185 | cmdtable = { |
|
|||
186 | "churn": |
|
|||
187 | (churn, |
|
|||
188 | [('r', 'rev', [], |
|
|||
189 | _('count rate for the specified revision or range'), _('REV')), |
|
|||
190 | ('d', 'date', '', |
|
|||
191 | _('count rate for revisions matching date spec'), _('DATE')), |
|
|||
192 | ('t', 'template', '{author|email}', |
|
|||
193 | _('template to group changesets'), _('TEMPLATE')), |
|
|||
194 | ('f', 'dateformat', '', |
|
|||
195 | _('strftime-compatible format for grouping by date'), _('FORMAT')), |
|
|||
196 | ('c', 'changesets', False, _('count rate by number of changesets')), |
|
|||
197 | ('s', 'sort', False, _('sort by key (default: sort by count)')), |
|
|||
198 | ('', 'diffstat', False, _('display added/removed lines separately')), |
|
|||
199 | ('', 'aliases', '', |
|
|||
200 | _('file with email aliases'), _('FILE')), |
|
|||
201 | ] + commands.walkopts, |
|
|||
202 | _("hg churn [-d DATE] [-r REV] [--aliases FILE] [FILE]")), |
|
|||
203 | } |
|
|||
204 |
|
||||
205 | commands.inferrepo += " churn" |
|
201 | commands.inferrepo += " churn" |
General Comments 0
You need to be logged in to leave comments.
Login now