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.
--- 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.