# HG changeset patch # User Pierre-Yves David # Date 1412292858 18000 # 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 -r 093df3b77f27 -r f5f51872883d mercurial/revset.py --- a/mercurial/revset.py Wed Sep 17 04:55:55 2014 -0700 +++ b/mercurial/revset.py Thu Oct 02 18:34:18 2014 -0500 @@ -2226,7 +2226,7 @@ """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 @@ """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"""