diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2732,7 +2732,18 @@ class _descgeneratorset(_generatorset): self._cache[x] = False return False -class spanset(_orderedsetmixin): +def spanset(repo, start=None, end=None): + """factory function to dispatch between fullreposet and actual spanset + + Feel free to update all spanset call sites and kill this function at some + point. + """ + if start is None and end is None: + return fullreposet(repo) + return _spanset(repo, start, end) + + +class _spanset(_orderedsetmixin): """Duck type for baseset class which represents a range of revisions and can work lazily and without having all the range in memory @@ -2851,7 +2862,7 @@ class spanset(_orderedsetmixin): def filter(self, l): return orderedlazyset(self, l, ascending=self.isascending()) -class fullreposet(spanset): +class fullreposet(_spanset): """a set containing all revisions in the repo This class exists to host special optimisation.