comparison hgext/extdiff.py @ 32375:04baab18d60a

commands: move templates of common command options to cmdutil (API) The goal is to get rid of the debugcommands -> commands dependency. Since globalopts is the property of the commands, it's kept in the commands module.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 14 May 2017 16:19:47 +0900
parents 46ba2cdda476
children 9fd9f91b0c43
comparison
equal deleted inserted replaced
32374:194b0f781132 32375:04baab18d60a
72 short, 72 short,
73 ) 73 )
74 from mercurial import ( 74 from mercurial import (
75 archival, 75 archival,
76 cmdutil, 76 cmdutil,
77 commands,
78 error, 77 error,
79 filemerge, 78 filemerge,
80 pycompat, 79 pycompat,
81 registrar, 80 registrar,
82 scmutil, 81 scmutil,
299 ('o', 'option', [], 298 ('o', 'option', [],
300 _('pass option to comparison program'), _('OPT')), 299 _('pass option to comparison program'), _('OPT')),
301 ('r', 'rev', [], _('revision'), _('REV')), 300 ('r', 'rev', [], _('revision'), _('REV')),
302 ('c', 'change', '', _('change made by revision'), _('REV')), 301 ('c', 'change', '', _('change made by revision'), _('REV')),
303 ('', 'patch', None, _('compare patches for two revisions')) 302 ('', 'patch', None, _('compare patches for two revisions'))
304 ] + commands.walkopts + commands.subrepoopts 303 ] + cmdutil.walkopts + cmdutil.subrepoopts
305 304
306 @command('extdiff', 305 @command('extdiff',
307 [('p', 'program', '', _('comparison program to run'), _('CMD')), 306 [('p', 'program', '', _('comparison program to run'), _('CMD')),
308 ] + extdiffopts, 307 ] + extdiffopts,
309 _('hg extdiff [OPT]... [FILE]...'), 308 _('hg extdiff [OPT]... [FILE]...'),