comparison mercurial/revset.py @ 22882:ecd27fee5c2b

fullreposet: drop custom sets but not smartsets detection All custom classes use by revsets are smartsets now. We drop the special-casing.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 10 Oct 2014 13:21:05 -0700
parents 057ebf7714e1
children e7b8cf352614
comparison
equal deleted inserted replaced
22881:057ebf7714e1 22882:ecd27fee5c2b
2985 # (this boldly assumes all smartset are pure) 2985 # (this boldly assumes all smartset are pure)
2986 # 2986 #
2987 # `other` was used with "&", let's assume this is a set like 2987 # `other` was used with "&", let's assume this is a set like
2988 # object. 2988 # object.
2989 other = baseset(other - self._hiddenrevs) 2989 other = baseset(other - self._hiddenrevs)
2990 elif not util.safehasattr(other, 'isascending'):
2991 # "other" is generatorset not a real smart set
2992 # we fallback to the old way (sad kitten)
2993 return super(fullreposet, self).__and__(other)
2994 2990
2995 if self.isascending(): 2991 if self.isascending():
2996 other.sort() 2992 other.sort()
2997 else: 2993 else:
2998 other.sort(reverse) 2994 other.sort(reverse)