(0.9.2compat) make patchfile monkey work with 0.9.5 0.9.2compat
authorChristian Ebert <blacktrash@gmx.net>
Sat, 09 Feb 2008 09:31:13 +0100
branch0.9.2compat
changeset 388 05fbd226cb5c
parent 387 ecb2935f9bb8
child 397 db7cc16560d4
(0.9.2compat) make patchfile monkey work with 0.9.5
hgkw/keyword.py
--- a/hgkw/keyword.py	Fri Feb 08 10:14:47 2008 +0100
+++ b/hgkw/keyword.py	Sat Feb 09 09:31:13 2008 +0100
@@ -145,7 +145,11 @@
     def _kwpatchfile_init(self, ui, fname, missing=False):
         '''Monkeypatch/wrap patch.patchfile.__init__ to avoid
         rejects or conflicts due to expanded keywords in working dir.'''
-        _patchfile_init(self, ui, fname, missing=missing)
+        try:
+            _patchfile_init(self, ui, fname, missing=missing)
+        except TypeError:
+            # "missing" arg added in e90e72c6b4c7
+            _patchfile_init(self, ui, fname)
         if _kwtemplater.matcher(self.fname):
             # shrink keywords read from working dir
             kwshrunk = _kwtemplater.shrink(''.join(self.lines))