mercurial/localrepo.py
changeset 49355 0540c1628fd4
parent 49343 4f04bb0d8deb
child 49451 0c70d888a484
child 49467 0705afae6253
--- a/mercurial/localrepo.py	Wed Jun 08 09:31:01 2022 +0200
+++ b/mercurial/localrepo.py	Sat Jun 11 00:56:50 2022 +0200
@@ -1747,7 +1747,9 @@
 
     def _makedirstate(self):
         """Extension point for wrapping the dirstate per-repo."""
-        sparsematchfn = lambda: sparse.matcher(self)
+        sparsematchfn = None
+        if sparse.use_sparse(self):
+            sparsematchfn = lambda: sparse.matcher(self)
         v2_req = requirementsmod.DIRSTATE_V2_REQUIREMENT
         th = requirementsmod.DIRSTATE_TRACKED_HINT_V1
         use_dirstate_v2 = v2_req in self.requirements