[Updated] D12156: obsolete: always return frozensets from obsolete.getrevs()
av6 (Anton Shestakov)
phabricator at mercurial-scm.org
Thu Feb 10 09:34:42 UTC 2022
Closed by commit rHG27fe84a8dd60: obsolete: always return frozensets from obsolete.getrevs() (authored by av6).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D12156?vs=32108&id=32116
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D12156/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D12156
AFFECTED FILES
mercurial/obsolete.py
CHANGE DETAILS
diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -940,8 +940,7 @@
getnode = repo.changelog.node
notpublic = _mutablerevs(repo)
isobs = repo.obsstore.successors.__contains__
- obs = {r for r in notpublic if isobs(getnode(r))}
- return obs
+ return frozenset(r for r in notpublic if isobs(getnode(r)))
@cachefor(b'orphan')
@@ -959,14 +958,14 @@
if p in obsolete or p in unstable:
unstable.add(r)
break
- return unstable
+ return frozenset(unstable)
@cachefor(b'suspended')
def _computesuspendedset(repo):
"""the set of obsolete parents with non obsolete descendants"""
suspended = repo.changelog.ancestors(getrevs(repo, b'orphan'))
- return {r for r in getrevs(repo, b'obsolete') if r in suspended}
+ return frozenset(r for r in getrevs(repo, b'obsolete') if r in suspended)
@cachefor(b'extinct')
@@ -998,7 +997,7 @@
# we have a public predecessor
bumped.add(rev)
break # Next draft!
- return bumped
+ return frozenset(bumped)
@cachefor(b'contentdivergent')
@@ -1025,7 +1024,7 @@
divergent.add(rev)
break
toprocess.update(obsstore.predecessors.get(prec, ()))
- return divergent
+ return frozenset(divergent)
def makefoldid(relation, user):
To: av6, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220210/a5f756ee/attachment-0002.html>
More information about the Mercurial-patches
mailing list