# HG changeset patch # User Anton Shestakov # Date 1633939131 -10800 # Node ID 761124310764afd0fe7659cb328992bd4bdf6f75 # Parent 6d29d97f4853ccdf9df4e441533b72c28d72a95d compat: cmdutil.check_incompatible_arguments() takes a list only on 5.4+ diff -r 6d29d97f4853 -r 761124310764 hgext3rd/evolve/compat.py --- a/hgext3rd/evolve/compat.py Fri Oct 08 14:38:48 2021 +0300 +++ b/hgext3rd/evolve/compat.py Mon Oct 11 10:58:51 2021 +0300 @@ -439,8 +439,14 @@ return previous if util.safehasattr(cmdutil, 'check_incompatible_arguments'): - def check_incompatible_arguments(opts, first, others): - return cmdutil.check_incompatible_arguments(opts, first, others) + code = cmdutil.check_incompatible_arguments.__code__ + if r'others' in code.co_varnames[:code.co_argcount]: + def check_incompatible_arguments(opts, first, others): + return cmdutil.check_incompatible_arguments(opts, first, others) + else: + # hg <= 5.3 (d4c1501225c4) + def check_incompatible_arguments(opts, first, others): + return cmdutil.check_incompatible_arguments(opts, first, *others) else: # hg <= 5.2 (023ad45e2fd2) def check_incompatible_arguments(opts, first, others):