abstractsmartset: add default implementation for filter
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 01 Oct 2014 00:26:50 -0500
changeset 22727 0f3e240a1c35
parent 22726 169aa5e74b52
child 22728 bf5ff3686100
abstractsmartset: add default implementation for filter
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