Mercurial > public > mercurial-scm > hg
comparison mercurial/revset.py @ 22744:3ed3ca4dfd31
addset: promote to real smartset
Better revset performance are also achieved with less overlay. There is no good
reason for addset to not be a smartset. We can replace the `_orderedsetmixin`
inheritance since `abstractsmartset` has efficient min and max too.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 02 Oct 2014 19:42:06 -0500 |
parents | eccf9907b844 |
children | 021660aeb75e |
comparison
equal
deleted
inserted
replaced
22743:eccf9907b844 | 22744:3ed3ca4dfd31 |
---|---|
2552 | 2552 |
2553 def reverse(self): | 2553 def reverse(self): |
2554 self._subset.reverse() | 2554 self._subset.reverse() |
2555 self._ascending = not self._ascending | 2555 self._ascending = not self._ascending |
2556 | 2556 |
2557 class _addset(_orderedsetmixin): | 2557 class _addset(abstractsmartset): |
2558 """Represent the addition of two sets | 2558 """Represent the addition of two sets |
2559 | 2559 |
2560 Wrapper structure for lazily adding two structures without losing much | 2560 Wrapper structure for lazily adding two structures without losing much |
2561 performance on the __contains__ method | 2561 performance on the __contains__ method |
2562 | 2562 |