store: drop the `filefilter` argument to `_walk`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 06 Apr 2021 10:37:55 +0200
changeset 46854 6afb5ef1e776
parent 46853 eed3e2b79b48
child 46855 aba724bf550e
store: drop the `filefilter` argument to `_walk` No code use it anywhere. Dropping it will help replacing the function with something with a more precise semantic. Differential Revision: https://phab.mercurial-scm.org/D10314
mercurial/store.py
--- a/mercurial/store.py	Tue Apr 06 10:37:47 2021 +0200
+++ b/mercurial/store.py	Tue Apr 06 10:37:55 2021 +0200
@@ -411,7 +411,7 @@
     def join(self, f):
         return self.path + b'/' + encodedir(f)
 
-    def _walk(self, relpath, recurse, filefilter=isrevlog):
+    def _walk(self, relpath, recurse):
         '''yields (unencoded, encoded, size)'''
         path = self.path
         if relpath:
@@ -425,7 +425,7 @@
                 p = visit.pop()
                 for f, kind, st in readdir(p, stat=True):
                     fp = p + b'/' + f
-                    if filefilter(f, kind, st):
+                    if isrevlog(f, kind, st):
                         n = util.pconvert(fp[striplen:])
                         l.append((decodedir(n), n, st.st_size))
                     elif kind == stat.S_IFDIR and recurse: