changeset 21781:f0c3b95af47f

extdiff: define inferrepo in command decorator
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 04 May 2014 22:29:27 -0700
parents 2d3fb8476d7a
children 404eca1ce4f9
files hgext/extdiff.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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"