Mercurial > hg
changeset 22507:5c00c5298f98
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 23 Sep 2014 12:21:38 -0700 |
parents | c425b22a7ca5 |
children | 2434c68d82a8 |
files | mercurial/obsolete.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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]