changeset 24370:3e8b06097d00

keyword: monkeypatch patch.diff more generically This function doesn't need access to any of the args or kwargs, so make the monkeypatching more robust. (In upcoming patches we'll introduce another argument to patch.diff, and this function would break if it weren't for this patch.)
author Siddharth Agarwal <sid0@fb.com>
date Tue, 17 Mar 2015 15:33:34 -0700
parents 109a2acc19ed
children 8a997bd73448
files hgext/keyword.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/keyword.py	Tue Mar 17 15:52:28 2015 -0700
+++ b/hgext/keyword.py	Tue Mar 17 15:33:34 2015 -0700
@@ -643,11 +643,10 @@
         # shrink keywords read from working dir
         self.lines = kwt.shrinklines(self.fname, self.lines)
 
-    def kwdiff(orig, repo, node1=None, node2=None, match=None, changes=None,
-                opts=None, prefix=''):
+    def kwdiff(orig, *args, **kwargs):
         '''Monkeypatch patch.diff to avoid expansion.'''
         kwt.restrict = True
-        return orig(repo, node1, node2, match, changes, opts, prefix)
+        return orig(*args, **kwargs)
 
     def kwweb_skip(orig, web, req, tmpl):
         '''Wraps webcommands.x turning off keyword expansion.'''