changeset 51575:50850689d3c0

branchcache: gather new obsolete revision in a set This is part of a series to more clearly split the update in two step. This will allow us to introduce a fast path during update in a future changeset.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 06 Mar 2024 16:09:42 +0100
parents a0ef462cf1a4
children 767b62cb728e
files mercurial/branchmap.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/branchmap.py	Wed Mar 06 15:54:22 2024 +0100
+++ b/mercurial/branchmap.py	Wed Mar 06 16:09:42 2024 +0100
@@ -288,6 +288,7 @@
         obsrevs = obsolete.getrevs(repo, b'obsolete')
         # collect new branch entries
         newbranches = {}
+        obs_ignored = set()
         getbranchinfo = repo.revbranchcache().branchinfo
         max_rev = -1
         for r in revgen:
@@ -295,6 +296,7 @@
             if r in obsrevs:
                 # We ignore obsolete changesets as they shouldn't be
                 # considered heads.
+                obs_ignored.add(r)
                 continue
             branch, closesbranch = getbranchinfo(r)
             newbranches.setdefault(branch, []).append(r)