metaedit: replace a compat condition with a less specific proxy
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 04 Feb 2020 13:00:05 -0800
changeset 5127 f4fae6359593
parent 5126 d57f4326623e
child 5128 7c2ca5e3a7ba
metaedit: replace a compat condition with a less specific proxy Same reasoning as for the previous patch. In this case, the closest commit I could find was 36 commits later (3d35304bd09b).
hgext3rd/evolve/cmdrewrite.py
--- a/hgext3rd/evolve/cmdrewrite.py	Tue Feb 04 12:46:55 2020 -0800
+++ b/hgext3rd/evolve/cmdrewrite.py	Tue Feb 04 13:00:05 2020 -0800
@@ -938,7 +938,9 @@
                     metadata[b'note'] = opts['note']
 
                 phases.retractboundary(repo, tr, targetphase, [newid])
-                if 'predecessors' in obsolete.createmarkers.__code__.co_varnames:
+                # Use this condition as a proxy since the commit we care about
+                # (6335c0de80fa) didn't change any signatures.
+                if not util.safehasattr(context, 'bin'):
                     obsolete.createmarkers(repo, [(tuple(allctx), (repo[newid],))],
                                            metadata=metadata, operation=b"metaedit")
                 else: