# HG changeset patch # User Pierre-Yves David # Date 2014-04-28 22:14:11 # Node ID 3e53a64345c17ba998d5f35cfd40e787684ec789 # Parent b7f49b7652411f9c38b2f49fad9da54510d2bb67 revset: cosmetic changes in spanset range comparison We use the python syntax for range comparison: `a < x < c`. This is shorter, more readable and less error prone. This comparison escaped the cleanup make in e2031c8ca4f8 diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2821,7 +2821,7 @@ class spanset(_orderedsetmixin): start = self._start end = self._end for rev in self._hiddenrevs: - if (end < rev <= start) or (start <= rev and rev < end): + if (end < rev <= start) or (start <= rev < end): count += 1 return abs(self._end - self._start) - count