diff mercurial/upgrade_utils/actions.py @ 49069:a31e9840178e

narrow: support debugupgraderepo Differential Revision: https://phab.mercurial-scm.org/D12542
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Tue, 12 Apr 2022 19:40:37 +0100
parents 642e31cb55f0
children 801ef401597e
line wrap: on
line diff
--- a/mercurial/upgrade_utils/actions.py	Tue Apr 05 12:06:32 2022 -0700
+++ b/mercurial/upgrade_utils/actions.py	Tue Apr 12 19:40:37 2022 +0100
@@ -37,6 +37,7 @@
 def preservedrequirements(repo):
     preserved = {
         requirements.SHARED_REQUIREMENT,
+        requirements.NARROW_REQUIREMENT,
     }
     return preserved & repo.requirements
 
@@ -1004,7 +1005,7 @@
 def supporteddestrequirements(repo):
     """Obtain requirements that upgrade supports in the destination.
 
-    If the result of the upgrade would create requirements not in this set,
+    If the result of the upgrade would have requirements not in this set,
     the upgrade is disallowed.
 
     Extensions should monkeypatch this to add their custom requirements.
@@ -1024,6 +1025,7 @@
         requirements.SHARESAFE_REQUIREMENT,
         requirements.SPARSEREVLOG_REQUIREMENT,
         requirements.STORE_REQUIREMENT,
+        requirements.NARROW_REQUIREMENT,
     }
     for name in compression.compengines:
         engine = compression.compengines[name]