spanset: do a single range check in __contains__
Now that `start <= end` is always true, we can simplify this function.
--- a/mercurial/revset.py Thu Oct 02 18:02:17 2014 -0500
+++ b/mercurial/revset.py Thu Oct 02 17:53:55 2014 -0500
@@ -2895,10 +2895,8 @@
return iter(iterrange)
def __contains__(self, rev):
- start = self._start
- end = self._end
hidden = self._hiddenrevs
- return (((end < rev <= start) or (start <= rev and rev < end))
+ return ((self._start <= rev < self._end)
and not (hidden and rev in hidden))
def __nonzero__(self):