mercurial/obsolete.py
branchstable
changeset 52132 e68fe567a780
parent 51658 a0f1378b932e
child 52136 c33734fbcd4b
--- 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, ()))