# HG changeset patch # User Pierre-Yves David # Date 2023-11-06 22:15:17 # Node ID 5f9af8422b311bd9713f795e38f98f19fd18e1fb # Parent 34e0670caf463c0f169453ea52c958ca022d7842 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. diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py --- a/mercurial/obsolete.py +++ b/mercurial/obsolete.py @@ -993,7 +993,8 @@ def _computephasedivergentset(repo): 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