Patchwork D10914: upgrade_utils: fix crash for removecldeltachain action

login
register
mail settings
Submitter phabricator
Date June 28, 2021, 10:15 a.m.
Message ID <differential-rev-PHID-DREV-rpo6n5mhqdiz3zrqpz3n-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49228/
State Superseded
Headers show

Comments

phabricator - June 28, 2021, 10:15 a.m.
Mathiasdm created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This fixes issue6383.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D10914

AFFECTED FILES
  mercurial/upgrade_utils/actions.py

CHANGE DETAILS




To: Mathiasdm, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/upgrade_utils/actions.py b/mercurial/upgrade_utils/actions.py
--- a/mercurial/upgrade_utils/actions.py
+++ b/mercurial/upgrade_utils/actions.py
@@ -642,7 +642,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.