# HG changeset patch # User Pierre-Yves David # Date 1699308958 -3600 # Node ID 5d740f920640a8e3920906845d8a49bd6ab4a81f # Parent 5f9af8422b311bd9713f795e38f98f19fd18e1fb unstable: use the `_mutablerevs` function when computing content 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 -r 5f9af8422b31 -r 5d740f920640 mercurial/obsolete.py --- a/mercurial/obsolete.py Mon Nov 06 23:15:17 2023 +0100 +++ b/mercurial/obsolete.py Mon Nov 06 23:15:58 2023 +0100 @@ -1016,7 +1016,8 @@ obsstore = repo.obsstore newermap = {} tonode = repo.changelog.node - for rev in repo.revs(b'(not public()) - obsolete()'): + candidates = sorted(_mutablerevs(repo) - getrevs(repo, b"obsolete")) + for rev in candidates: node = tonode(rev) mark = obsstore.predecessors.get(node, ()) toprocess = set(mark)