changeset 22855:b5492b6bc7e8

baseset: drop custom __add__ method This add method is enforcing non-laziness, disabling multiple optimisations. Benchmarks do not spot any significant differences but real usecase may. This will also be important for further improvements to addset later in this series.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 09 Oct 2014 04:27:01 -0700
parents f8a4ce6fb27a
children c1546d7400ef
files mercurial/revset.py
diffstat 1 files changed, 0 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Tue Sep 16 17:57:44 2014 -0700
+++ b/mercurial/revset.py	Thu Oct 09 04:27:01 2014 -0700
@@ -2388,14 +2388,6 @@
         This is part of the mandatory API for smartset."""
         return baseset([y for y in self if y in other])
 
-    def __add__(self, other):
-        """Returns a new object with the union of the two collections.
-
-        This is part of the mandatory API for smartset."""
-        s = self.set()
-        l = [r for r in other if r not in s]
-        return baseset(list(self) + l)
-
     def isascending(self):
         """Returns True if the collection is ascending order, False if not.