changeset 48724:c7e675848027

scmutil: obsrevs is already a frozenset Differential Revision: https://phab.mercurial-scm.org/D12157
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 07 Feb 2022 12:29:43 +0300
parents 27fe84a8dd60
children 3199b575375d
files mercurial/scmutil.py
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Mon Feb 07 12:25:46 2022 +0300
+++ b/mercurial/scmutil.py	Mon Feb 07 12:29:43 2022 +0300
@@ -366,9 +366,7 @@
         obsrevs = obsolete.getrevs(repo, b'obsolete')
         if not cl.filteredrevs and not obsrevs:
             return None
-        # TODO: obsrevs should be a frozenset, but right now obsolete.getrevs()
-        # may return a set, which is not a hashable type.
-        key = (maxrev, hash(cl.filteredrevs), hash(frozenset(obsrevs)))
+        key = (maxrev, hash(cl.filteredrevs), hash(obsrevs))
     else:
         if not cl.filteredrevs:
             return None