narrow: overwrite readfast in excludeddirmanifestctx
The excludeddirmanifestctx does not have underlying storage (because it is
excluded) so the implementation of the `readfast` trying to access it crash.
This was reveled while running some cache warning code on narrow repositories.
That code will be introduced further down in the series.
Differential Revision: https://phab.mercurial-scm.org/D9731
--- a/mercurial/manifest.py Mon Jan 11 17:46:55 2021 -0800
+++ b/mercurial/manifest.py Tue Jan 12 23:27:24 2021 +0100
@@ -2297,6 +2297,10 @@
def read(self):
return excludeddir(self._dir, self._node)
+ def readfast(self, shallow=False):
+ # special version of readfast since we don't have underlying storage
+ return self.read()
+
def write(self, *args):
raise error.ProgrammingError(
b'attempt to write manifest from excluded dir %s' % self._dir