store: do not record file that are not part of a revlog in fncache
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 15 May 2023 08:55:19 +0200
changeset 50467 0dbab42adca5
parent 50466 fa78e8727a2d
child 50468 fd5507619d16
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.
mercurial/store.py
--- 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.