mercurial/branchmap.py
changeset 51487 1a9bdd0e1c44
parent 51486 0ddc34330d41
child 51488 94f821490645
--- a/mercurial/branchmap.py	Fri Mar 08 15:06:54 2024 +0100
+++ b/mercurial/branchmap.py	Fri Mar 08 15:50:15 2024 +0100
@@ -166,7 +166,10 @@
 
     def write_delayed(self, repo):
         unfi = repo.unfiltered()
-        for filtername, cache in self._per_filter.items():
+        for filtername in repoviewutil.get_ordered_subset():
+            cache = self._per_filter.get(filtername)
+            if cache is None:
+                continue
             if cache._delayed:
                 if filtername is None:
                     repo = unfi