Mercurial > hg
comparison mercurial/statichttprepo.py @ 41615:328ca3b9e545
branchmap: encapsulate cache updating in the map itself
Rather than have a repository update the cache, move handling of cache updates
into the branchmap module, in the form of a custom mapping class.
This makes later performance improvements easier to handle too.
Differential Revision: https://phab.mercurial-scm.org/D5638
author | Martijn Pieters <mj@octobus.net> |
---|---|
date | Mon, 21 Jan 2019 17:37:33 +0000 |
parents | 6e9bebb65ce7 |
children | d345627d104b |
comparison
equal
deleted
inserted
replaced
41612:fbd4ce55bcbd | 41615:328ca3b9e545 |
---|---|
11 | 11 |
12 import errno | 12 import errno |
13 | 13 |
14 from .i18n import _ | 14 from .i18n import _ |
15 from . import ( | 15 from . import ( |
16 branchmap, | |
16 changelog, | 17 changelog, |
17 error, | 18 error, |
18 localrepo, | 19 localrepo, |
19 manifest, | 20 manifest, |
20 namespaces, | 21 namespaces, |
191 self.manifestlog = manifest.manifestlog(self.svfs, self, rootmanifest, | 192 self.manifestlog = manifest.manifestlog(self.svfs, self, rootmanifest, |
192 self.narrowmatch()) | 193 self.narrowmatch()) |
193 self.changelog = changelog.changelog(self.svfs) | 194 self.changelog = changelog.changelog(self.svfs) |
194 self._tags = None | 195 self._tags = None |
195 self.nodetagscache = None | 196 self.nodetagscache = None |
196 self._branchcaches = {} | 197 self._branchcaches = branchmap.BranchMapCache() |
197 self._revbranchcache = None | 198 self._revbranchcache = None |
198 self.encodepats = None | 199 self.encodepats = None |
199 self.decodepats = None | 200 self.decodepats = None |
200 self._transref = None | 201 self._transref = None |
201 | 202 |