--- a/hgext3rd/evolve/compat.py Tue Jul 09 10:56:42 2019 -0700
+++ b/hgext3rd/evolve/compat.py Thu Jul 11 16:04:17 2019 -0700
@@ -114,9 +114,14 @@
args = [a, '', b, '', fn1, fn2]
# hg < 4.6 compat 8b6dd3922f70
- argspec = inspect.getargspec(mdiff.unidiff)
+ if util.safehasattr(inspect, 'signature'):
+ signature = inspect.signature(mdiff.unidiff)
+ needsbinary = 'binary' in signature.parameters
+ else:
+ argspec = inspect.getargspec(mdiff.unidiff)
+ needsbinary = 'binary' in argspec.args
- if 'binary' in argspec.args:
+ if needsbinary:
args.append(False)
return mdiff.unidiff(*args)