comparison mercurial/revset.py @ 21284:3e53a64345c1

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
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 28 Apr 2014 15:14:11 -0700
parents b7f49b765241
children dd716807fd23
comparison
equal deleted inserted replaced
21283:b7f49b765241 21284:3e53a64345c1
2819 else: 2819 else:
2820 count = 0 2820 count = 0
2821 start = self._start 2821 start = self._start
2822 end = self._end 2822 end = self._end
2823 for rev in self._hiddenrevs: 2823 for rev in self._hiddenrevs:
2824 if (end < rev <= start) or (start <= rev and rev < end): 2824 if (end < rev <= start) or (start <= rev < end):
2825 count += 1 2825 count += 1
2826 return abs(self._end - self._start) - count 2826 return abs(self._end - self._start) - count
2827 2827
2828 def __getitem__(self, x): 2828 def __getitem__(self, x):
2829 # Basic implementation to be changed in future patches. 2829 # Basic implementation to be changed in future patches.