changeset 22756:5308f21c049e

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 03 Oct 2014 12:36:57 -0500
parents f9a825b593be
children d34969a4b1a8
files mercurial/revset.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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]