# HG changeset patch # User Pierre-Yves David # Date 2014-09-23 19:21:38 # Node ID 5c00c5298f9807ae4f329dc25d517c4091bc43f3 # Parent c425b22a7ca56e15b63415730862776b72f07153 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. diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py --- a/mercurial/obsolete.py +++ b/mercurial/obsolete.py @@ -852,7 +852,7 @@ def getrevs(repo, name): 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]