upgrade_utils: fix crash for removecldeltachain action
authorMathias De Mare <mathias.de_mare@nokia.com>
Mon, 28 Jun 2021 12:12:34 +0200
changeset 47646 4259a72fe528
parent 47645 b41b4c1c644f
child 47647 f16958beb27b
upgrade_utils: fix crash for removecldeltachain action This fixes issue6383. Differential Revision: https://phab.mercurial-scm.org/D10914
mercurial/upgrade_utils/actions.py
--- a/mercurial/upgrade_utils/actions.py	Fri Jul 16 14:22:02 2021 +0200
+++ b/mercurial/upgrade_utils/actions.py	Mon Jun 28 12:12:34 2021 +0200
@@ -633,7 +633,10 @@
     newactions = []
 
     for d in format_upgrades:
-        name = d._requirement
+        if util.safehasattr(d, '_requirement'):
+            name = d._requirement
+        else:
+            name = None
 
         # If the action is a requirement that doesn't show up in the
         # destination requirements, prune the action.