##// END OF EJS Templates
extdiff: make new diff commands pick up their options correctly
TK Soh -
r2959:7f5fc4b3 default
parent child Browse files
Show More
@@ -153,7 +153,7 b' def uisetup(ui):'
153 if not path: path = cmd
153 if not path: path = cmd
154 diffopts = ui.config('extdiff', 'opts.' + cmd, '')
154 diffopts = ui.config('extdiff', 'opts.' + cmd, '')
155 diffopts = diffopts and [diffopts] or []
155 diffopts = diffopts and [diffopts] or []
156 def save(cmd, path):
156 def save(cmd, path, diffopts):
157 '''use closure to save diff command to use'''
157 '''use closure to save diff command to use'''
158 def mydiff(ui, repo, *pats, **opts):
158 def mydiff(ui, repo, *pats, **opts):
159 return dodiff(ui, repo, path, diffopts, pats, opts)
159 return dodiff(ui, repo, path, diffopts, pats, opts)
@@ -170,6 +170,6 b' def uisetup(ui):'
170 'path': path,
170 'path': path,
171 }
171 }
172 return mydiff
172 return mydiff
173 cmdtable[cmd] = (save(cmd, path),
173 cmdtable[cmd] = (save(cmd, path, diffopts),
174 cmdtable['extdiff'][1][1:],
174 cmdtable['extdiff'][1][1:],
175 _('hg %s [OPT]... [FILE]...') % cmd)
175 _('hg %s [OPT]... [FILE]...') % cmd)
General Comments 0
You need to be logged in to leave comments. Login now