Mercurial > hg
diff 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 |
line wrap: on
line diff
--- a/mercurial/statichttprepo.py Thu Feb 07 21:16:25 2019 -0800 +++ b/mercurial/statichttprepo.py Mon Jan 21 17:37:33 2019 +0000 @@ -13,6 +13,7 @@ from .i18n import _ from . import ( + branchmap, changelog, error, localrepo, @@ -193,7 +194,7 @@ self.changelog = changelog.changelog(self.svfs) self._tags = None self.nodetagscache = None - self._branchcaches = {} + self._branchcaches = branchmap.BranchMapCache() self._revbranchcache = None self.encodepats = None self.decodepats = None