# HG changeset patch # User Anton Shestakov # Date 1648382792 -10800 # Node ID 635b95454ccef27638cd594d6681ef76a9b926ea # Parent 4466989cee8def5aaf1f9c4ea0256dfc8ae5a05f precheck: compatibility with hg 6.2 (check_divergence keyword argument) diff -r 4466989cee8d -r 635b95454cce hgext3rd/evolve/rewriteutil.py --- a/hgext3rd/evolve/rewriteutil.py Fri Jul 23 00:34:29 2021 +0530 +++ b/hgext3rd/evolve/rewriteutil.py Sun Mar 27 15:06:32 2022 +0300 @@ -59,9 +59,9 @@ can be used to control the commit message. """ - # If this attribute exists, then core's rewriteutil is recent enough - # that it has all the features from our own implementation. - if util.safehasattr(corerewriteutil, 'find_new_divergence_from'): + # hg <= 6.1 (d4752aeb20f1) + code = corerewriteutil.precheck.__code__ + if r'check_divergence' in code.co_varnames[:code.co_argcount]: return corerewriteutil.precheck(repo, revs, action, check_divergence=check_divergence)