changeset 51067:26dcdbe15024

revlog: remove legacy usage of `_lazydeltabase` All core code is now getting the setting from the DeltaConfig object.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 10 Oct 2023 12:03:02 +0200
parents b79c73a7afce
children 41c73325af52
files contrib/perf.py mercurial/revlogutils/deltas.py
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/perf.py	Tue Oct 10 11:36:55 2023 +0200
+++ b/contrib/perf.py	Tue Oct 10 12:03:02 2023 +0200
@@ -3549,7 +3549,10 @@
     timings = []
     tr = _faketr()
     with _temprevlog(ui, orig, startrev) as dest:
-        dest._lazydeltabase = lazydeltabase
+        if hasattr(dest, "delta_config"):
+            dest.delta_config.lazy_delta_base = lazydeltabase
+        else:
+            dest._lazydeltabase = lazydeltabase
         revs = list(orig.revs(startrev, stoprev))
         total = len(revs)
         topic = 'adding'
--- a/mercurial/revlogutils/deltas.py	Tue Oct 10 11:36:55 2023 +0200
+++ b/mercurial/revlogutils/deltas.py	Tue Oct 10 12:03:02 2023 +0200
@@ -1177,7 +1177,7 @@
                 and self.revlog.length(currentbase) == 0
             ):
                 currentbase = self.revlog.deltaparent(currentbase)
-            if self.revlog._lazydelta and currentbase == base:
+            if self.revlog.delta_config.lazy_delta and currentbase == base:
                 delta = revinfo.cachedelta[1]
         if delta is None:
             delta = self._builddeltadiff(base, revinfo)