# HG changeset patch # User Pierre-Yves David # Date 2024-03-06 15:09:42 # Node ID 50850689d3c03117e9de948429f862643081b3e7 # Parent a0ef462cf1a4f4ab92e88260c0c19bd73f8a7547 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. diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py --- a/mercurial/branchmap.py +++ b/mercurial/branchmap.py @@ -288,6 +288,7 @@ class _BaseBranchCache: 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 @@ class _BaseBranchCache: 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)