# HG changeset patch # User TK Soh # Date 1155846645 18000 # Node ID 7f5fc4b347de86cc8bafa8e7c02f49b238ab3da6 # Parent ff3ea21a981a448598f2e4f58430d1e688bfebb9 extdiff: make new diff commands pick up their options correctly diff --git a/hgext/extdiff.py b/hgext/extdiff.py --- a/hgext/extdiff.py +++ b/hgext/extdiff.py @@ -153,7 +153,7 @@ def uisetup(ui): if not path: path = cmd diffopts = ui.config('extdiff', 'opts.' + cmd, '') diffopts = diffopts and [diffopts] or [] - def save(cmd, path): + def save(cmd, path, diffopts): '''use closure to save diff command to use''' def mydiff(ui, repo, *pats, **opts): return dodiff(ui, repo, path, diffopts, pats, opts) @@ -170,6 +170,6 @@ def uisetup(ui): 'path': path, } return mydiff - cmdtable[cmd] = (save(cmd, path), + cmdtable[cmd] = (save(cmd, path, diffopts), cmdtable['extdiff'][1][1:], _('hg %s [OPT]... [FILE]...') % cmd)