--- a/hgext/extdiff.py Mon Jan 04 21:40:05 2016 +0900
+++ b/hgext/extdiff.py Mon Jan 04 22:13:46 2016 +0900
@@ -270,15 +270,17 @@
ui.note(_('cleaning up temp directory\n'))
shutil.rmtree(tmproot)
-@command('extdiff',
- [('p', 'program', '',
- _('comparison program to run'), _('CMD')),
+extdiffopts = [
('o', 'option', [],
_('pass option to comparison program'), _('OPT')),
('r', 'rev', [], _('revision'), _('REV')),
('c', 'change', '', _('change made by revision'), _('REV')),
('', 'patch', None, _('compare patches for two revisions'))
- ] + commands.walkopts + commands.subrepoopts,
+ ] + commands.walkopts + commands.subrepoopts
+
+@command('extdiff',
+ [('p', 'program', '', _('comparison program to run'), _('CMD')),
+ ] + extdiffopts,
_('hg extdiff [OPT]... [FILE]...'),
inferrepo=True)
def extdiff(ui, repo, *pats, **opts):
@@ -368,5 +370,5 @@
mydiff.__doc__ = doc.decode(encoding.encoding)
return mydiff
cmdtable[cmd] = (save(cmdline),
- cmdtable['extdiff'][1][1:],
+ extdiffopts[:],
_('hg %s [OPTION]... [FILE]...') % cmd)