Mercurial > hg
comparison mercurial/revset.py @ 21283:b7f49b765241
revset: drop spanset._contained
All its users inlined it for performance reasons.
(See 1d7a2771aa36 and e2031c8ca4f8)
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 25 Apr 2014 23:38:24 -0700 |
parents | 2195ac506c6a |
children | 3e53a64345c1 |
comparison
equal
deleted
inserted
replaced
21282:697fba94dec9 | 21283:b7f49b765241 |
---|---|
2762 | 2762 |
2763 def descending(self): | 2763 def descending(self): |
2764 if self._start < self._end: | 2764 if self._start < self._end: |
2765 self.reverse() | 2765 self.reverse() |
2766 | 2766 |
2767 def _contained(self, rev): | |
2768 return (rev <= self._start and rev > self._end) or (rev >= self._start | |
2769 and rev < self._end) | |
2770 | |
2771 def __iter__(self): | 2767 def __iter__(self): |
2772 if self._start <= self._end: | 2768 if self._start <= self._end: |
2773 iterrange = xrange(self._start, self._end) | 2769 iterrange = xrange(self._start, self._end) |
2774 else: | 2770 else: |
2775 iterrange = xrange(self._start, self._end, -1) | 2771 iterrange = xrange(self._start, self._end, -1) |