Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/bundlerepo.py @ 29834:27c0792e834c
manifest: break mancache into two caches
The old manifest cache cached both the inmemory representation and the raw text.
As part of the manifest refactor we want to separate the storage format from the
in memory representation, so let's split this cache into two caches.
This will let other manifest implementations participate in the in memory cache,
while allowing the revlog based implementations to still depend on the full text
caching where necessary.
author | Durham Goode <durham@fb.com> |
---|---|
date | Wed, 17 Aug 2016 13:25:13 -0700 |
parents | 55d341877316 |
children | bb3281b3fcaa |
comparison
equal
deleted
inserted
replaced
29833:61a4cdc98307 | 29834:27c0792e834c |
---|---|
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._mancache: |
208 result = self._mancache[node][0].text() | 208 result = self._mancache[node].text() |
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): |