comparison hgext/extdiff.py @ 5122:c80af96943aa

refactor options from cmdtable - add extracommitopts for user and date - factor stuff
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Wed, 08 Aug 2007 12:27:20 +0200
parents d4fa6bafc43a
children a1efa71f3ece
comparison
equal deleted inserted replaced
5121:7106f4899aa0 5122:c80af96943aa
48 # needed files, so running the external diff program will actually be 48 # needed files, so running the external diff program will actually be
49 # pretty fast (at least faster than having to compare the entire tree). 49 # pretty fast (at least faster than having to compare the entire tree).
50 50
51 from mercurial.i18n import _ 51 from mercurial.i18n import _
52 from mercurial.node import * 52 from mercurial.node import *
53 from mercurial import cmdutil, util 53 from mercurial import cmdutil, util, commands
54 import os, shutil, tempfile 54 import os, shutil, tempfile
55 55
56 56
57 def snapshot_node(ui, repo, files, node, tmproot): 57 def snapshot_node(ui, repo, files, node, tmproot):
58 '''snapshot files as of some revision''' 58 '''snapshot files as of some revision'''
179 "extdiff": 179 "extdiff":
180 (extdiff, 180 (extdiff,
181 [('p', 'program', '', _('comparison program to run')), 181 [('p', 'program', '', _('comparison program to run')),
182 ('o', 'option', [], _('pass option to comparison program')), 182 ('o', 'option', [], _('pass option to comparison program')),
183 ('r', 'rev', [], _('revision')), 183 ('r', 'rev', [], _('revision')),
184 ('I', 'include', [], _('include names matching the given patterns')), 184 ] + commands.walkopts,
185 ('X', 'exclude', [], _('exclude names matching the given patterns'))],
186 _('hg extdiff [OPT]... [FILE]...')), 185 _('hg extdiff [OPT]... [FILE]...')),
187 } 186 }
188 187
189 def uisetup(ui): 188 def uisetup(ui):
190 for cmd, path in ui.configitems('extdiff'): 189 for cmd, path in ui.configitems('extdiff'):