changeset 51786:e4954fd3d1c3

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.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 06 Aug 2024 02:13:17 +0200
parents bcb825bf0c5e
children 73b9558a0c56
files mercurial/changegroup.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)