changeset 51468: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 d54f0692820d
files mercurial/branchmap.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)