generatorset: make use of the new mechanism in the subclass
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 03 Oct 2014 12:36:57 -0500
changeset 22756 5308f21c049e
parent 22755 f9a825b593be
child 22757 d34969a4b1a8
generatorset: make use of the new mechanism in the subclass Until we remove them, we use the new parameter of _generatorset to make sure the code is run.
mercurial/revset.py
--- a/mercurial/revset.py	Fri Oct 03 12:36:08 2014 -0500
+++ b/mercurial/revset.py	Fri Oct 03 12:36:57 2014 -0500
@@ -2703,6 +2703,10 @@
     This class does not duck-type baseset and it's only supposed to be used
     internally
     """
+
+    def __init__(self, gen):
+        super(_ascgeneratorset, self).__init__(gen, iterasc=True)
+
     def __contains__(self, x):
         if x in self._cache:
             return self._cache[x]
@@ -2726,6 +2730,10 @@
     This class does not duck-type baseset and it's only supposed to be used
     internally
     """
+
+    def __init__(self, gen):
+        super(_descgeneratorset, self).__init__(gen, iterasc=False)
+
     def __contains__(self, x):
         if x in self._cache:
             return self._cache[x]