mercurial/localrepo.py
changeset 47280 1766130fe9ba
parent 47279 40b51c28b242
child 47296 d1589957fdcb
--- a/mercurial/localrepo.py	Wed May 19 13:15:00 2021 +0200
+++ b/mercurial/localrepo.py	Wed May 19 13:15:00 2021 +0200
@@ -1690,6 +1690,8 @@
     def _makedirstate(self):
         """Extension point for wrapping the dirstate per-repo."""
         sparsematchfn = lambda: sparse.matcher(self)
+        v2_req = requirementsmod.DIRSTATE_V2_REQUIREMENT
+        use_dirstate_v2 = v2_req in self.requirements
 
         return dirstate.dirstate(
             self.vfs,
@@ -1698,6 +1700,7 @@
             self._dirstatevalidate,
             sparsematchfn,
             self.nodeconstants,
+            use_dirstate_v2,
         )
 
     def _dirstatevalidate(self, node):