churn: define inferrepo in command decorator
authorGregory Szorc <gregory.szorc@gmail.com>
Sun, 04 May 2014 22:24:38 -0700
changeset 21779 a57deb45c744
parent 21778 f6a6d07b66b3
child 21780 2d3fb8476d7a
churn: define inferrepo in command decorator
hgext/churn.py
--- a/hgext/churn.py	Sun May 04 22:22:59 2014 -0700
+++ b/hgext/churn.py	Sun May 04 22:24:38 2014 -0700
@@ -104,7 +104,8 @@
     ('', 'diffstat', False, _('display added/removed lines separately')),
     ('', 'aliases', '', _('file with email aliases'), _('FILE')),
     ] + commands.walkopts,
-    _("hg churn [-d DATE] [-r REV] [--aliases FILE] [FILE]"))
+    _("hg churn [-d DATE] [-r REV] [--aliases FILE] [FILE]"),
+    inferrepo=True)
 def churn(ui, repo, *pats, **opts):
     '''histogram of changes to the repository
 
@@ -197,5 +198,3 @@
 
     for name, count in rate:
         ui.write(format(name, count))
-
-commands.inferrepo += " churn"