changeset 739:2bf300b83136

stupid: handle patch.iterhunks() changed brought by cfedc529e4a1
author Patrick Mezard <pmezard@gmail.com>
date Wed, 03 Nov 2010 22:03:42 +0100
parents 2ddb95cd36dd
children c8c438b010aa
files hgsubversion/stupid.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/stupid.py
+++ b/hgsubversion/stupid.py
@@ -83,7 +83,10 @@ def filteriterhunks(meta):
         applycurrent = False
         # Passing False instead of textmode because we should never
         # be ignoring EOL type.
-        if len(iterhunks.func_defaults) == 1:
+        if not iterhunks.func_defaults:
+            # Since 1.7 (cfedc529e4a1)
+            gen = iterhunks(ui, fp)
+        elif len(iterhunks.func_defaults) == 1:
             gen = iterhunks(ui, fp, sourcefile)
         else:
             gen = iterhunks(ui, fp, sourcefile, textmode)