comparison mercurial/branchmap.py @ 51465:4188a0570ba1

branchcache: avoid created a `None` filter repoview when writing The repoview class is not intended to be used for unfiltered repository.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 07 Mar 2024 11:04:34 +0100
parents 9007387a227c
children 0ddc34330d41
comparison
equal deleted inserted replaced
51462:9007387a227c 51465:4188a0570ba1
166 166
167 def write_delayed(self, repo): 167 def write_delayed(self, repo):
168 unfi = repo.unfiltered() 168 unfi = repo.unfiltered()
169 for filtername, cache in self._per_filter.items(): 169 for filtername, cache in self._per_filter.items():
170 if cache._delayed: 170 if cache._delayed:
171 repo = unfi.filtered(filtername) 171 if filtername is None:
172 repo = unfi
173 else:
174 repo = unfi.filtered(filtername)
172 cache.write(repo) 175 cache.write(repo)
173 176
174 177
175 def _unknownnode(node): 178 def _unknownnode(node):
176 """raises ValueError when branchcache found a node which does not exists""" 179 """raises ValueError when branchcache found a node which does not exists"""