mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
manifest: move clearcaches to manifestlog
This is part of removing all functionality from manifest.manifest so we can delete the class entirely.
This commit is contained in:
parent
64058b3c19
commit
240c640350
@ -566,7 +566,7 @@ def perfmanifest(ui, repo, rev, **opts):
|
||||
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()
|
||||
|
@ -1322,6 +1322,10 @@ class manifestlog(object):
|
||||
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 @@ class manifest(manifestrevlog):
|
||||
self._dirlogcache[dir] = manifest(self.opener, dir,
|
||||
self._dirlogcache)
|
||||
return self._dirlogcache[dir]
|
||||
|
||||
def clearcaches(self):
|
||||
super(manifest, self).clearcaches()
|
||||
self._mancache.clear()
|
||||
|
Loading…
Reference in New Issue
Block a user