obsolete: ensure that `getrevs` always return a set
authorPierre-Yves David <pierre-yves.david@fb.com>
Tue, 23 Sep 2014 12:21:38 -0700
changeset 22507 5c00c5298f98
parent 22504 c425b22a7ca5
child 22508 2434c68d82a8
obsolete: ensure that `getrevs` always return a set When a set of revisions was empty, we were using an empty tuple. We now return an empty frozenset to ensure the object could be used in an operation that requires a set.
mercurial/obsolete.py
--- a/mercurial/obsolete.py	Sat Sep 27 13:18:10 2014 -0500
+++ b/mercurial/obsolete.py	Tue Sep 23 12:21:38 2014 -0700
@@ -852,7 +852,7 @@
     Such access may compute the set and cache it for future use"""
     repo = repo.unfiltered()
     if not repo.obsstore:
-        return ()
+        return frozenset()
     if name not in repo.obsstore.caches:
         repo.obsstore.caches[name] = cachefuncs[name](repo)
     return repo.obsstore.caches[name]