branchcache: avoid created a `None` filter repoview when writing
The repoview class is not intended to be used for unfiltered repository.
--- a/mercurial/branchmap.py Mon Feb 26 15:26:08 2024 +0100
+++ b/mercurial/branchmap.py Thu Mar 07 11:04:34 2024 +0100
@@ -168,7 +168,10 @@
unfi = repo.unfiltered()
for filtername, cache in self._per_filter.items():
if cache._delayed:
- repo = unfi.filtered(filtername)
+ if filtername is None:
+ repo = unfi
+ else:
+ repo = unfi.filtered(filtername)
cache.write(repo)