changeset 51056:f0756d0636d1

revlog: remove legacy usage of `_compengine` All core code is now getting the setting from the FeatureConfig object.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 10 Oct 2023 11:12:06 +0200
parents fa7d307e2150
children 101c30938c0d
files mercurial/revlog.py mercurial/revlogutils/docket.py
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Wed Oct 11 00:04:23 2023 +0200
+++ b/mercurial/revlog.py	Tue Oct 10 11:12:06 2023 +0200
@@ -976,7 +976,7 @@
 
     @util.propertycache
     def _compressor(self):
-        engine = util.compengines[self._compengine]
+        engine = util.compengines[self.feature_config.compression_engine]
         return engine.revlogcompressor(self._compengineopts)
 
     @util.propertycache
--- a/mercurial/revlogutils/docket.py	Wed Oct 11 00:04:23 2023 +0200
+++ b/mercurial/revlogutils/docket.py	Tue Oct 10 11:12:06 2023 +0200
@@ -330,7 +330,9 @@
     rl_version = version_header & 0xFFFF
     if rl_version not in (constants.REVLOGV2, constants.CHANGELOGV2):
         return None
-    comp = util.compengines[revlog._compengine].revlogheader()
+    comp = util.compengines[
+        revlog.feature_config.compression_engine
+    ].revlogheader()
     docket = RevlogDocket(
         revlog,
         version_header=version_header,