# HG changeset patch # User Pierre-Yves David # Date 1412141210 18000 # Node ID 0f3e240a1c35bb5fbb91244d48aad452005b0ef4 # Parent 169aa5e74b52af325b485a9b26137f979d4dc829 abstractsmartset: add default implementation for filter diff -r 169aa5e74b52 -r 0f3e240a1c35 mercurial/revset.py --- a/mercurial/revset.py Fri Oct 03 01:16:23 2014 -0500 +++ b/mercurial/revset.py Wed Oct 01 00:26:50 2014 -0500 @@ -2295,7 +2295,12 @@ boolean. This is part of the mandatory API for smartset.""" - raise NotImplementedError() + kwargs = {} + if self.isascending(): + kwargs['ascending'] = True + elif self.isdescending(): + kwargs['ascending'] = False + return filteredset(self, condition, **kwargs) class baseset(list, abstractsmartset): """Basic data structure that represents a revset and contains the basic