changeset 51330:49401b7dec0c

delta-find: feed revinfo to _DeltaSearch The revinfo has more information and will allow for even more function to be turned into method.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 22 Dec 2023 01:33:33 +0100
parents 398a105b16a0
children 7455cae67260
files mercurial/revlogutils/deltas.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlogutils/deltas.py	Thu Nov 23 03:23:11 2023 +0100
+++ b/mercurial/revlogutils/deltas.py	Fri Dec 22 01:33:33 2023 +0100
@@ -685,7 +685,7 @@
     def __init__(
         self,
         revlog,
-        textlen,
+        revinfo,
         p1,
         p2,
         cachedelta,
@@ -702,7 +702,8 @@
             or not revlog.delta_config.general_delta
         )
         self.revlog = revlog
-        self.textlen = textlen
+        self.revinfo = revinfo
+        self.textlen = revinfo.textlen
         self.p1 = p1
         self.p2 = p2
         self.cachedelta = cachedelta
@@ -1432,7 +1433,7 @@
 
         search = _DeltaSearch(
             self.revlog,
-            revinfo.textlen,
+            revinfo,
             p1r,
             p2r,
             cachedelta,