changeset 20417:827561a99569

revset: added __add__ method to baseset class
author Lucas Moscovicz <lmoscovicz@fb.com>
date Thu, 06 Feb 2014 11:37:16 -0800
parents e72bcc245ecb
children 454c143b9955
files mercurial/revset.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Thu Feb 06 11:33:36 2014 -0800
+++ b/mercurial/revset.py	Thu Feb 06 11:37:16 2014 -0800
@@ -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()