Mercurial > public > mercurial-scm > hg
diff mercurial/obsolete.py @ 52132:e68fe567a780 stable
evolution: stop wrongly flagging unrelated part of a split as divergent
Before this change, divergence introduced by successors of a split would "spill"
to other unrelated successors of the split that were not ambiguous.
This small changes fixes it.
Thanks goes to Manuel Jacobs for the discussion leading to this realization that
a new simple and correct definition could be found.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 25 Oct 2024 17:33:47 +0200 |
parents | a0f1378b932e |
children | c33734fbcd4b |
line wrap: on
line diff
--- a/mercurial/obsolete.py Sat Oct 26 05:09:55 2024 +0200 +++ b/mercurial/obsolete.py Fri Oct 25 17:33:47 2024 +0200 @@ -1030,7 +1030,9 @@ if prec not in newermap: obsutil.successorssets(repo, prec, cache=newermap) newer = [n for n in newermap[prec] if n] - if len(newer) > 1: + # Strickly speaking, the len(newer) is not needed, but it speeds + # things up. + if len(newer) > 1 and any(n for n in newer if node not in n): divergent.add(rev) break toprocess.update(obsstore.predecessors.get(prec, ()))