mercurial/localrepo.py
changeset 50186 8bc14ac53a41
parent 50128 2f60cd6442fd
child 50187 f18e4608bb61
--- a/mercurial/localrepo.py	Thu Feb 23 04:02:38 2023 +0100
+++ b/mercurial/localrepo.py	Thu Feb 23 04:15:16 2023 +0100
@@ -1469,6 +1469,8 @@
         # post-dirstate-status hooks
         self._postdsstatus = []
 
+        self._pending_narrow_pats = None
+
         # generic mapping between names and nodes
         self.names = namespaces.namespaces()
 
@@ -1799,7 +1801,11 @@
 
         A tuple of (includes, excludes).
         """
-        return narrowspec.load(self)
+        # the narrow management should probably move into its own object
+        val = self._pending_narrow_pats
+        if val is None:
+            val = narrowspec.load(self)
+        return val
 
     @storecache(narrowspec.FILENAME)
     def _storenarrowmatch(self):