manifest: use `read_any_fast_delta` during shallow prefetch's
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 01 Aug 2024 05:37:57 +0200
changeset 51779 82c6ea97dd64
parent 51778 7e5ea2a0c3ef
child 51780 852bd109dd55
manifest: use `read_any_fast_delta` during shallow prefetch's We now have a better function with a clear semantic. This simplify the usage in the remotefilelog code.
hgext/remotefilelog/shallowrepo.py
--- a/hgext/remotefilelog/shallowrepo.py	Thu Aug 01 05:36:53 2024 +0200
+++ b/hgext/remotefilelog/shallowrepo.py	Thu Aug 01 05:37:57 2024 +0200
@@ -292,11 +292,7 @@
 
                 # Decompressing manifests is expensive.
                 # When possible, only read the deltas.
-                p1, p2 = mfrevlog.parentrevs(mfrev)
-                if p1 in visited and p2 in visited:
-                    mfdict = mfl[mfnode].readfast()
-                else:
-                    mfdict = mfl[mfnode].read()
+                mfdict = mfl[mfnode].read_any_fast_delta(visited)[1]
 
                 diff = mfdict.items()
                 if pats: