manifest: use read_delta_new_entries in changegroup validate
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 06 Aug 2024 02:13:17 +0200
changeset 51786 e4954fd3d1c3
parent 51785 bcb825bf0c5e
child 51787 73b9558a0c56
manifest: use read_delta_new_entries in changegroup validate This new method have a well defined semantic and can be adjusted by narrow as it needs. This should prevent some unwanted filelog access when running validate on a server using narrow profile to restrict access.
mercurial/changegroup.py
--- a/mercurial/changegroup.py	Tue Aug 06 02:12:08 2024 +0200
+++ b/mercurial/changegroup.py	Tue Aug 06 02:13:17 2024 +0200
@@ -611,7 +611,7 @@
                 # validate incoming csets have their manifests
                 for cset in range(clstart, clend):
                     mfnode = cl.changelogrevision(cset).manifest
-                    mfest = ml[mfnode].readdelta()
+                    mfest = ml[mfnode].read_delta_new_entries()
                     # store file nodes we must see
                     for f, n in mfest.items():
                         needfiles.setdefault(f, set()).add(n)