_spanset: drop __getitem__ implementation
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 15 Oct 2014 12:38:47 -0700
changeset 22998 93e5d24692cc
parent 22997 d16804069db1
child 22999 88ac1be3f767
_spanset: drop __getitem__ implementation It is expensive and not part of the official smartset API.
mercurial/revset.py
--- a/mercurial/revset.py	Wed Oct 15 12:38:32 2014 -0700
+++ b/mercurial/revset.py	Wed Oct 15 12:38:47 2014 -0700
@@ -2907,11 +2907,6 @@
                     count += 1
             return abs(self._end - self._start) - count
 
-    def __getitem__(self, x):
-        # Basic implementation to be changed in future patches.
-        l = baseset([r for r in self])
-        return l[x]
-
     def isascending(self):
         return self._start <= self._end