mercurial/obsolete.py
changeset 52136 c33734fbcd4b
parent 51892 8583d138f436
parent 52132 e68fe567a780
--- a/mercurial/obsolete.py	Sun Oct 27 17:29:18 2024 -0400
+++ b/mercurial/obsolete.py	Mon Oct 28 11:45:02 2024 +0100
@@ -1053,7 +1053,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, ()))