Mercurial > hg-stable
changeset 21205:e2031c8ca4f8 stable
revset: also inline spanset._contained in __len__
For consistency with what happen in `__contains__`, we inline the range test
into `__len__` too.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 25 Apr 2014 18:00:07 -0700 |
parents | 1d7a2771aa36 |
children | c77418938d05 |
files | mercurial/revset.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Mon Apr 28 15:15:36 2014 -0700 +++ b/mercurial/revset.py Fri Apr 25 18:00:07 2014 -0700 @@ -2822,8 +2822,10 @@ return abs(self._end - self._start) else: count = 0 + start = self._start + end = self._end for rev in self._hiddenrevs: - if self._contained(rev): + if (end < rev <= start) or (start <= rev and rev < end): count += 1 return abs(self._end - self._start) - count