Mercurial > public > mercurial-scm > hg
comparison mercurial/manifest.py @ 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 | 93e09d370003 |
children | 711ba0f1057e |
comparison
equal
deleted
inserted
replaced
46246:416ecdaa12df | 46247:a3ccbac659d8 |
---|---|
2295 self._node = node | 2295 self._node = node |
2296 | 2296 |
2297 def read(self): | 2297 def read(self): |
2298 return excludeddir(self._dir, self._node) | 2298 return excludeddir(self._dir, self._node) |
2299 | 2299 |
2300 def readfast(self, shallow=False): | |
2301 # special version of readfast since we don't have underlying storage | |
2302 return self.read() | |
2303 | |
2300 def write(self, *args): | 2304 def write(self, *args): |
2301 raise error.ProgrammingError( | 2305 raise error.ProgrammingError( |
2302 b'attempt to write manifest from excluded dir %s' % self._dir | 2306 b'attempt to write manifest from excluded dir %s' % self._dir |
2303 ) | 2307 ) |
2304 | 2308 |