Mercurial > public > mercurial-scm > hg
comparison mercurial/bundlerepo.py @ 29925:1619efcde9a4
manifest: make one use of _mancache avoid manifestctxs
In a future patch we will change manifestctx and treemanifestctx to no longer
derive from manifestdict and treemanifest, respectively. This means that
consumers of the _mancache will now need to be aware of the different between
the two, until we get rid of the manifest entirely and the _mancache becomes
only filled with ctxs.
This fixes one case of it that can be fixed by using the other cache. Future
patches will address the others uses using the upcoming manifestctx.read()
function.
author | Durham Goode <durham@fb.com> |
---|---|
date | Mon, 12 Sep 2016 14:29:09 -0700 |
parents | 8a658b8b795a |
children | 1767723f71cf |
comparison
equal
deleted
inserted
replaced
29924:45bf56a89197 | 29925:1619efcde9a4 |
---|---|
202 def baserevision(self, nodeorrev): | 202 def baserevision(self, nodeorrev): |
203 node = nodeorrev | 203 node = nodeorrev |
204 if isinstance(node, int): | 204 if isinstance(node, int): |
205 node = self.node(node) | 205 node = self.node(node) |
206 | 206 |
207 if node in self._mancache: | 207 if node in self.fulltextcache: |
208 result = self._mancache[node].text() | 208 result = self.fulltextcache[node].tostring() |
209 else: | 209 else: |
210 result = manifest.manifest.revision(self, nodeorrev) | 210 result = manifest.manifest.revision(self, nodeorrev) |
211 return result | 211 return result |
212 | 212 |
213 def dirlog(self, d): | 213 def dirlog(self, d): |