changeset 46247:a3ccbac659d8

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
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 12 Jan 2021 23:27:24 +0100
parents 416ecdaa12df
children 7488067b8c1e
files mercurial/manifest.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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