# HG changeset patch # User Pierre-Yves David # Date 1709805874 -3600 # Node ID 4188a0570ba17e96257eb84d6b556398f3c5c5a5 # Parent 9007387a227c0c884423a6b4b66a3cad18917eec branchcache: avoid created a `None` filter repoview when writing The repoview class is not intended to be used for unfiltered repository. diff -r 9007387a227c -r 4188a0570ba1 mercurial/branchmap.py --- 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)