branchcache: avoid created a `None` filter repoview when writing
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 07 Mar 2024 11:04:34 +0100
changeset 51531 4188a0570ba1
parent 51530 9007387a227c
child 51532 d54f0692820d
branchcache: avoid created a `None` filter repoview when writing The repoview class is not intended to be used for unfiltered repository.
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)