changeset 27681:174069440929

extdiff: use @command decorator to set up diff commands It can set "inferrepo" attribute appropriately.
author Yuya Nishihara <yuya@tcha.org>
date Fri, 01 Jan 2016 22:35:34 +0900
parents c750245c6b85
children bd706395351b
files hgext/extdiff.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/extdiff.py	Mon Jan 04 22:13:46 2016 +0900
+++ b/hgext/extdiff.py	Fri Jan 01 22:35:34 2016 +0900
@@ -369,6 +369,5 @@
             # right encoding) prevents that.
             mydiff.__doc__ = doc.decode(encoding.encoding)
             return mydiff
-        cmdtable[cmd] = (save(cmdline),
-                         extdiffopts[:],
-                         _('hg %s [OPTION]... [FILE]...') % cmd)
+        command(cmd, extdiffopts[:], _('hg %s [OPTION]... [FILE]...') % cmd,
+                inferrepo=True)(save(cmdline))