# HG changeset patch # User Pierre-Yves David # Date 1610490444 -3600 # 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 -r 416ecdaa12df -r a3ccbac659d8 mercurial/manifest.py --- 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