delta-find: feed revinfo to _DeltaSearch
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 22 Dec 2023 01:33:33 +0100
changeset 51330 49401b7dec0c
parent 51329 398a105b16a0
child 51331 7455cae67260
delta-find: feed revinfo to _DeltaSearch The revinfo has more information and will allow for even more function to be turned into method.
mercurial/revlogutils/deltas.py
--- 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,