diff mercurial/revset.py @ 20417:827561a99569

revset: added __add__ method to baseset class
author Lucas Moscovicz <lmoscovicz@fb.com>
date Thu, 06 Feb 2014 11:37:16 -0800 (2014-02-06)
parents e72bcc245ecb
children 454c143b9955
line wrap: on
line diff
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -2067,5 +2067,10 @@
             x = x.set()
         return baseset([y for y in self if y in x])
 
+    def __add__(self, x):
+        s = self.set()
+        l = [r for r in x if r not in s]
+        return baseset(list(self) + l)
+
 # tell hggettext to extract docstrings from these functions:
 i18nfunctions = symbols.values()