mercurial/context.py
changeset 52721 f071b18e1382
parent 52644 e627cc25b6f3
child 52723 a502f3f389b5
--- a/mercurial/context.py	Sat Jan 25 23:49:24 2025 +0100
+++ b/mercurial/context.py	Sat Feb 01 13:04:32 2025 +0100
@@ -2542,7 +2542,9 @@
         files = self.files()
 
         def getfile(repo, memctx, path):
-            if self._cache[path][b'exists']:
+            if path not in self._cache:
+                return self.filectx(path)
+            elif self._cache[path][b'exists']:
                 return memfilectx(
                     repo,
                     memctx,