Mercurial > public > mercurial-scm > hg
comparison mercurial/manifest.py @ 32171:fb9b6bfb54b5
manifest: remove check for non-contexts in _dirmancache
It looks like the _dirmancache has contained only manifest contexts
since d79c141fdf41 (manifest: remove usages of manifest.read,
2016-11-10).
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 05 May 2017 14:10:58 -0700 |
parents | 94c1d3c1aea2 |
children | 9d3136638784 |
comparison
equal
deleted
inserted
replaced
32170:b9d97bf96f61 | 32171:fb9b6bfb54b5 |
---|---|
1338 | 1338 |
1339 `verify` - if True an exception will be thrown if the node is not in | 1339 `verify` - if True an exception will be thrown if the node is not in |
1340 the revlog | 1340 the revlog |
1341 """ | 1341 """ |
1342 if node in self._dirmancache.get(dir, ()): | 1342 if node in self._dirmancache.get(dir, ()): |
1343 cachemf = self._dirmancache[dir][node] | 1343 return self._dirmancache[dir][node] |
1344 # The old manifest may put non-ctx manifests in the cache, so | |
1345 # skip those since they don't implement the full api. | |
1346 if (isinstance(cachemf, manifestctx) or | |
1347 isinstance(cachemf, treemanifestctx)): | |
1348 return cachemf | |
1349 | 1344 |
1350 if dir: | 1345 if dir: |
1351 if self._revlog._treeondisk: | 1346 if self._revlog._treeondisk: |
1352 if verify: | 1347 if verify: |
1353 dirlog = self._revlog.dirlog(dir) | 1348 dirlog = self._revlog.dirlog(dir) |