changeset 22881:057ebf7714e1

addset: drop `.set()` usage during iteration We can use the containment check directly.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 10 Oct 2014 12:30:00 -0700
parents 5b635b44af14
children ecd27fee5c2b
files mercurial/revset.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Fri Oct 10 12:31:22 2014 -0700
+++ b/mercurial/revset.py	Fri Oct 10 12:30:00 2014 -0700
@@ -2541,9 +2541,9 @@
             def gen():
                 for r in self._r1:
                     yield r
-                s = self._r1.set()
+                inr1 = self._r1.__contains__
                 for r in self._r2:
-                    if r not in s:
+                    if not inr1(r):
                         yield r
             gen = gen()
         else: