# HG changeset patch # User Pierre-Yves David # Date 2014-10-02 23:34:18 # Node ID f5f51872883ddb6dcb018db32513373ac138083d # Parent 093df3b77f27c1d83bdeec577ad4bc2c1e7bda53 abstractsmartset: default implementation for `ascending` and `descending` These two methods are actually silly aliases for `sort()` and `sort(reverse=True)`. So we get that aliasing at the abstractsmartset level. We will slowly phase out all the custom implementations and eventually remove any mentions of it from the code. diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2226,7 +2226,7 @@ class abstractsmartset(object): """Sorts the set in ascending order (in place). This is part of the mandatory API for smartset.""" - raise NotImplementedError() + self.sort() def isdescending(self): """True if the set will iterate in descending order""" @@ -2236,7 +2236,7 @@ class abstractsmartset(object): """Sorts the set in descending order (in place). This is part of the mandatory API for smartset.""" - raise NotImplementedError() + self.sort(reverse=True) def min(self): """return the minimum element in the set"""