# HG changeset patch # User Gregory Szorc # Date 1533937202 25200 # Node ID 1347bcf52d5101363f9da1b992fe47187045db04 # Parent aad4b46e89bb05430ba16e2dcc835fb62db31389 manifest: set appropriate cache entry when clearing _dirlogcache() manifestrevlog applies to any manifest, not just the root manifest. Resetting the cache and populating its root entry with self is not correct when the instance does not refer to the root manifest. This has no test fallout. So I'm guessing we only ever call clearcaches() on the root manifest. Or we have no test coverage that are impacted by a bad cache on a non-root manifestrevlog. Differential Revision: https://phab.mercurial-scm.org/D4275 diff -r aad4b46e89bb -r 1347bcf52d51 mercurial/manifest.py --- a/mercurial/manifest.py Fri Aug 10 14:20:47 2018 -0700 +++ b/mercurial/manifest.py Fri Aug 10 14:40:02 2018 -0700 @@ -1325,7 +1325,7 @@ def clearcaches(self, clear_persisted_data=False): super(manifestrevlog, self).clearcaches() self._fulltextcache.clear(clear_persisted_data=clear_persisted_data) - self._dirlogcache = {'': self} + self._dirlogcache = {self._dir: self} def dirlog(self, d): if d: