stupid: handle patch.iterhunks() changed brought by 909cb420154c

This commit is contained in:
Patrick Mezard 2010-11-03 22:03:42 +01:00
parent 51b4a561d4
commit 5f20856c4b

View File

@ -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)