comparison mercurial/localrepo.py @ 42127:70b71421fd33

repoview: keep the branchmap cache for the `served.hidden` view warm For the same reason we want to keep the cache for the `served` view up to date, we want to also keep the `served.hidden` view up to date. If some processes with a readonly access to the repo needs to access it, we better have the cache warm to avoid computing the same data over and over and over. In most case (no secret changesets), the "served" and "served.hidden" set will be identical and no cache will actually have to be updated.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 04 Apr 2019 13:58:49 +0200
parents e0357a46c39d
children b970fece153d
comparison
equal deleted inserted replaced
42126:ef0e3cc684b3 42127:70b71421fd33
2105 2105
2106 if tr is None or tr.changes['origrepolen'] < len(self): 2106 if tr is None or tr.changes['origrepolen'] < len(self):
2107 # accessing the 'ser ved' branchmap should refresh all the others, 2107 # accessing the 'ser ved' branchmap should refresh all the others,
2108 self.ui.debug('updating the branch cache\n') 2108 self.ui.debug('updating the branch cache\n')
2109 self.filtered('served').branchmap() 2109 self.filtered('served').branchmap()
2110 self.filtered('served.hidden').branchmap()
2110 2111
2111 if full: 2112 if full:
2112 unfi = self.unfiltered() 2113 unfi = self.unfiltered()
2113 rbc = unfi.revbranchcache() 2114 rbc = unfi.revbranchcache()
2114 for r in unfi.changelog: 2115 for r in unfi.changelog: