changeset 50467:0dbab42adca5

store: do not record file that are not part of a revlog in fncache The fncache exist to list file to copy/stream when cloning a repository, it should only contains file that are relevant for a revlog in such case. For example, temporary file are not relevant. So we now skip the addiction of non-relevant file to the fn-cache in the first place.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 15 May 2023 08:55:19 +0200
parents fa78e8727a2d
children fd5507619d16
files mercurial/store.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/store.py	Mon May 15 08:55:02 2023 +0200
+++ b/mercurial/store.py	Mon May 15 08:55:19 2023 +0200
@@ -732,8 +732,10 @@
 
     def __call__(self, path, mode=b'r', *args, **kw):
         encoded = self.encode(path)
-        if mode not in (b'r', b'rb') and (
-            path.startswith(b'data/') or path.startswith(b'meta/')
+        if (
+            mode not in (b'r', b'rb')
+            and (path.startswith(b'data/') or path.startswith(b'meta/'))
+            and revlog_type(path) is not None
         ):
             # do not trigger a fncache load when adding a file that already is
             # known to exist.