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
--- 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: