# HG changeset patch # User Yuya Nishihara # Date 1451655334 -32400 # Node ID 174069440929ba2fb9a0ea81e7d79f90f298da94 # Parent c750245c6b852756ef4e0b3f26a46bd2a8c1e3d7 extdiff: use @command decorator to set up diff commands It can set "inferrepo" attribute appropriately. diff -r c750245c6b85 -r 174069440929 hgext/extdiff.py --- 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))