# HG changeset patch # User Durham Goode # Date 1478772799 28800 # Node ID 10c924596e5c2dd91d599512cd65cc7e724df6c0 # Parent d79c141fdf416a2e7d1f0f9b31bf55c35e7a84b1 manifest: move clearcaches to manifestlog This is part of removing all functionality from manifest.manifest so we can delete the class entirely. diff -r d79c141fdf41 -r 10c924596e5c contrib/perf.py --- a/contrib/perf.py Thu Nov 10 02:13:19 2016 -0800 +++ b/contrib/perf.py Thu Nov 10 02:13:19 2016 -0800 @@ -566,7 +566,7 @@ ctx = scmutil.revsingle(repo, rev, rev) t = ctx.manifestnode() def d(): - repo.manifest.clearcaches() + repo.manifestlog.clearcaches() repo.manifestlog[t].read() timer(d) fm.end() diff -r d79c141fdf41 -r 10c924596e5c mercurial/manifest.py --- a/mercurial/manifest.py Thu Nov 10 02:13:19 2016 -0800 +++ b/mercurial/manifest.py Thu Nov 10 02:13:19 2016 -0800 @@ -1322,6 +1322,10 @@ mancache[node] = m return m + def clearcaches(self): + self._dirmancache.clear() + self._revlog.clearcaches() + class memmanifestctx(object): def __init__(self, repo): self._repo = repo @@ -1593,7 +1597,3 @@ self._dirlogcache[dir] = manifest(self.opener, dir, self._dirlogcache) return self._dirlogcache[dir] - - def clearcaches(self): - super(manifest, self).clearcaches() - self._mancache.clear()