# HG changeset patch # User Pierre-Yves David # Date 2014-10-10 19:30:00 # Node ID 057ebf7714e1898279fe3070b2c4ef52f2385ef2 # Parent 5b635b44af14778357000b851b169525e483c152 addset: drop `.set()` usage during iteration We can use the containment check directly. diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2541,9 +2541,9 @@ class addset(abstractsmartset): 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: