revset: changed spanset to take a repo argument
This way, we can have by default the length of the repo as the end argument
and less code has to be aware of hidden revisions.
--- a/mercurial/revset.py Mon Feb 17 14:49:56 2014 -0600
+++ b/mercurial/revset.py Tue Feb 18 11:38:03 2014 -0800
@@ -2166,10 +2166,13 @@
"""Duck type for baseset class which represents a range of revisions and
can work lazily and without having all the range in memory
"""
- def __init__(self, start, end, hiddenrevs=set()):
+ def __init__(self, repo, start=0, end=None):
self._start = start
- self._end = end
- self._hiddenrevs = hiddenrevs
+ if end is not None:
+ self._end = end
+ else:
+ self._end = len(repo)
+ self._hiddenrevs = repo.changelog.filteredrevs
def _contained(self, rev):
return (rev <= self._start and rev > self._end) or (rev >= self._start