Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/manifest.py @ 30380:10c924596e5c
manifest: move clearcaches to manifestlog
This is part of removing all functionality from manifest.manifest so we can
delete the class entirely.
author | Durham Goode <durham@fb.com> |
---|---|
date | Thu, 10 Nov 2016 02:13:19 -0800 |
parents | d79c141fdf41 |
children | fccc3eea2ddb |
comparison
equal
deleted
inserted
replaced
30379:d79c141fdf41 | 30380:10c924596e5c |
---|---|
1320 mancache = util.lrucachedict(self.cachesize) | 1320 mancache = util.lrucachedict(self.cachesize) |
1321 self._dirmancache[dir] = mancache | 1321 self._dirmancache[dir] = mancache |
1322 mancache[node] = m | 1322 mancache[node] = m |
1323 return m | 1323 return m |
1324 | 1324 |
1325 def clearcaches(self): | |
1326 self._dirmancache.clear() | |
1327 self._revlog.clearcaches() | |
1328 | |
1325 class memmanifestctx(object): | 1329 class memmanifestctx(object): |
1326 def __init__(self, repo): | 1330 def __init__(self, repo): |
1327 self._repo = repo | 1331 self._repo = repo |
1328 self._manifestdict = manifestdict() | 1332 self._manifestdict = manifestdict() |
1329 | 1333 |
1591 assert self._treeondisk | 1595 assert self._treeondisk |
1592 if dir not in self._dirlogcache: | 1596 if dir not in self._dirlogcache: |
1593 self._dirlogcache[dir] = manifest(self.opener, dir, | 1597 self._dirlogcache[dir] = manifest(self.opener, dir, |
1594 self._dirlogcache) | 1598 self._dirlogcache) |
1595 return self._dirlogcache[dir] | 1599 return self._dirlogcache[dir] |
1596 | |
1597 def clearcaches(self): | |
1598 super(manifest, self).clearcaches() | |
1599 self._mancache.clear() |