extdiff: define inferrepo in command decorator
authorGregory Szorc <gregory.szorc@gmail.com>
Sun, 04 May 2014 22:29:27 -0700
changeset 21781 f0c3b95af47f
parent 21780 2d3fb8476d7a
child 21782 404eca1ce4f9
extdiff: define inferrepo in command decorator
hgext/extdiff.py
--- a/hgext/extdiff.py	Sun May 04 22:25:28 2014 -0700
+++ b/hgext/extdiff.py	Sun May 04 22:29:27 2014 -0700
@@ -248,7 +248,8 @@
     ('r', 'rev', [], _('revision'), _('REV')),
     ('c', 'change', '', _('change made by revision'), _('REV')),
     ] + commands.walkopts,
-    _('hg extdiff [OPT]... [FILE]...'))
+    _('hg extdiff [OPT]... [FILE]...'),
+    inferrepo=True)
 def extdiff(ui, repo, *pats, **opts):
     '''use external program to diff repository (or selected files)
 
@@ -325,5 +326,3 @@
         cmdtable[cmd] = (save(cmd, path, diffopts),
                          cmdtable['extdiff'][1][1:],
                          _('hg %s [OPTION]... [FILE]...') % cmd)
-
-commands.inferrepo += " extdiff"