# HG changeset patch # User Pierre-Yves David # Date 2021-01-12 22:27:24 # Node ID a3ccbac659d808b45e6648758deb7349e6542c2a # Parent 416ecdaa12dff4be5c6d3ec3e4e20a2bb14948d5 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 diff --git a/mercurial/manifest.py b/mercurial/manifest.py --- a/mercurial/manifest.py +++ b/mercurial/manifest.py @@ -2297,6 +2297,10 @@ class excludeddirmanifestctx(treemanifes 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