Catch TypeError in repo.wwrite for Mercurial rev 656e06eebda7
This is the one revision that had the file descriptor removed,
but the flags argument not added yet.
--- a/hgkw/keyword.py Sun Sep 02 15:16:57 2007 +0200
+++ b/hgkw/keyword.py Sun Sep 02 15:35:18 2007 +0200
@@ -191,10 +191,11 @@
def _wwrite(self, f, data, man):
'''Makes repo.wwrite backwards compatible.'''
+ # 656e06eebda7 removed file descriptor argument
+ # 67982d3ee76c added flags argument
try:
self.repo.wwrite(f, data, man.flags(f))
- except AttributeError:
- # older versions want file descriptor as 3. optional arg
+ except (AttributeError, TypeError):
self.repo.wwrite(f, data)
def _normal(self, files):