diff mercurial/revlogutils/deltas.py @ 51080:5645524c6b62

revlog: also migrates `revlog.upperboundcomp` to ConfigClass This was planned but overlooked when doing the rest of the migration.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 13 Oct 2023 16:11:04 +0200
parents 26dcdbe15024
children a82704902db8
line wrap: on
line diff
--- a/mercurial/revlogutils/deltas.py	Fri Oct 13 16:03:26 2023 +0200
+++ b/mercurial/revlogutils/deltas.py	Fri Oct 13 16:11:04 2023 +0200
@@ -784,8 +784,8 @@
             if deltas_limit < chainsize:
                 tested.add(rev)
                 continue
-            if sparse and revlog.upperboundcomp is not None:
-                maxcomp = revlog.upperboundcomp
+            if sparse and revlog.delta_config.upper_bound_comp is not None:
+                maxcomp = revlog.delta_config.upper_bound_comp
                 basenotsnap = (p1, p2, nullrev)
                 if rev not in basenotsnap and revlog.issnapshot(rev):
                     snapshotdepth = revlog.snapshotdepth(rev)
@@ -1186,8 +1186,10 @@
             msg %= len(delta)
             self._write_debug(msg)
         # snapshotdept need to be neither None nor 0 level snapshot
-        if revlog.upperboundcomp is not None and snapshotdepth:
-            lowestrealisticdeltalen = len(delta) // revlog.upperboundcomp
+        if revlog.delta_config.upper_bound_comp is not None and snapshotdepth:
+            lowestrealisticdeltalen = (
+                len(delta) // revlog.delta_config.upper_bound_comp
+            )
             snapshotlimit = revinfo.textlen >> snapshotdepth
             if self._debug_search:
                 msg = b"DBG-DELTAS-SEARCH:     projected-lower-size=%d\n"