--- a/mercurial/localrepo.py Tue Jan 17 14:53:18 2023 +0100
+++ b/mercurial/localrepo.py Mon Jan 23 17:21:14 2023 +0100
@@ -58,6 +58,7 @@
obsolete,
pathutil,
phases,
+ policy,
pushkey,
pycompat,
rcutil,
@@ -3763,7 +3764,11 @@
if ui.configbool(b'format', b'bookmarks-in-store'):
requirements.add(requirementsmod.BOOKMARKS_IN_STORE_REQUIREMENT)
- if ui.configbool(b'format', b'use-persistent-nodemap'):
+ # The feature is disabled unless a fast implementation is available.
+ persistent_nodemap_default = policy.importrust('revlog') is not None
+ if ui.configbool(
+ b'format', b'use-persistent-nodemap', persistent_nodemap_default
+ ):
requirements.add(requirementsmod.NODEMAP_REQUIREMENT)
# if share-safe is enabled, let's create the new repository with the new