# HG changeset patch # User Patrick Mezard # Date 1288818222 -3600 # Node ID 2bf300b83136b5b69c38dffc80d67a254bee4cf9 # Parent 2ddb95cd36dd879953ad866622e917c96d9b3e73 stupid: handle patch.iterhunks() changed brought by cfedc529e4a1 diff --git a/hgsubversion/stupid.py b/hgsubversion/stupid.py --- 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)