mercurial/upgrade.py
changeset 46048 f4f956342cf1
parent 46047 4b89cf08d8dc
child 46050 ad9dd4d333be
--- a/mercurial/upgrade.py	Tue Dec 01 15:11:06 2020 +0100
+++ b/mercurial/upgrade.py	Tue Dec 01 15:45:23 2020 +0100
@@ -72,26 +72,7 @@
                 revlogs.discard(upgrade)
 
     # Ensure the repository can be upgraded.
-    missingreqs = (
-        upgrade_actions.requiredsourcerequirements(repo) - repo.requirements
-    )
-    if missingreqs:
-        raise error.Abort(
-            _(b'cannot upgrade repository; requirement missing: %s')
-            % _(b', ').join(sorted(missingreqs))
-        )
-
-    blockedreqs = (
-        upgrade_actions.blocksourcerequirements(repo) & repo.requirements
-    )
-    if blockedreqs:
-        raise error.Abort(
-            _(
-                b'cannot upgrade repository; unsupported source '
-                b'requirement: %s'
-            )
-            % _(b', ').join(sorted(blockedreqs))
-        )
+    upgrade_actions.check_source_requirements(repo)
 
     # FUTURE there is potentially a need to control the wanted requirements via
     # command arguments or via an extension hook point.