diff mercurial/localrepo.py @ 49778:45d7b8c380d7

changelog-v2: add a configuration to disable rank computation We encountered a graph where rank computation was pathologically slow. We add an option to disable this computation while this is getting fixed. Disabling the rank computation should allow for testing other changelog-v2 features undisturbed (like changeset-based copy tracing). I am purposely not adding a test for the new non-default code path, as this is a temporary work around of an experimental feature.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 22 Nov 2022 12:44:22 +0100
parents f5f113f1b011
children 78af51ba73c5
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon Nov 21 15:04:19 2022 +0100
+++ b/mercurial/localrepo.py	Tue Nov 22 12:44:22 2022 +0100
@@ -1068,6 +1068,8 @@
         options[b'revlogv2'] = True
     if requirementsmod.CHANGELOGV2_REQUIREMENT in requirements:
         options[b'changelogv2'] = True
+        cmp_rank = ui.configbool(b'experimental', b'changelog-v2.compute-rank')
+        options[b'changelogv2.compute-rank'] = cmp_rank
 
     if requirementsmod.GENERALDELTA_REQUIREMENT in requirements:
         options[b'generaldelta'] = True