Mercurial > hg-stable
changeset 22753:16c20403de80
_orderedsetmixin: drop this now unused class
All my friends are dead.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 02 Oct 2014 19:48:14 -0500 |
parents | 7bbc35c43bff |
children | 1119e544cd2d |
files | mercurial/revset.py |
diffstat | 1 files changed, 0 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Thu Oct 02 19:47:33 2014 -0500 +++ b/mercurial/revset.py Thu Oct 02 19:48:14 2014 -0500 @@ -2384,37 +2384,6 @@ This is part of the mandatory API for smartset.""" return filteredset(self, condition) -class _orderedsetmixin(object): - """Mixin class with utility methods for smartsets - - This should be extended by smartsets which have the isascending(), - isdescending() and reverse() methods""" - - def _first(self): - """return the first revision in the set""" - for r in self: - return r - raise ValueError('arg is an empty sequence') - - def _last(self): - """return the last revision in the set""" - self.reverse() - m = self._first() - self.reverse() - return m - - def min(self): - """return the smallest element in the set""" - if self.isascending(): - return self._first() - return self._last() - - def max(self): - """return the largest element in the set""" - if self.isascending(): - return self._last() - return self._first() - class filteredset(abstractsmartset): """Duck type for baseset class which iterates lazily over the revisions in the subset and contains a function which tests for membership in the