changeset 51122:5f9af8422b31

unstable: use the `_mutablerevs` function when computing phase divergent This is a useful function to get the revision relevant to these computation, lets make sure all code use it, so that we can improve that `_mutablerevs` function in a later changeset.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 06 Nov 2023 23:15:17 +0100
parents 34e0670caf46
children 5d740f920640
files mercurial/obsolete.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/obsolete.py	Mon Nov 06 11:07:54 2023 +0100
+++ b/mercurial/obsolete.py	Mon Nov 06 23:15:17 2023 +0100
@@ -993,7 +993,8 @@
     torev = cl.index.get_rev
     tonode = cl.node
     obsstore = repo.obsstore
-    for rev in repo.revs(b'(not public()) and (not obsolete())'):
+    candidates = sorted(_mutablerevs(repo) - getrevs(repo, b"obsolete"))
+    for rev in candidates:
         # We only evaluate mutable, non-obsolete revision
         node = tonode(rev)
         # (future) A cache of predecessors may worth if split is very common