# HG changeset patch # User Lucas Moscovicz # Date 1394670026 25200 # Node ID 17c89e5a5627a1834eceb366304ca15ddbcf071d # Parent 1d5d6f622b94907fdd1aabf6656d01ee1a925fca revset: made addset a private class This class is not supposed to be used outside revset.py since it only wraps content that is used by baseset typed classes. It only gets created by revset operations or private methods. diff -r 1d5d6f622b94 -r 17c89e5a5627 mercurial/revset.py --- a/mercurial/revset.py Wed Mar 12 17:19:46 2014 -0700 +++ b/mercurial/revset.py Wed Mar 12 17:20:26 2014 -0700 @@ -2236,7 +2236,7 @@ return lazyset(self, lambda r: r not in x) def __add__(self, x): - return lazyset(addset(self, x)) + return lazyset(_addset(self, x)) def __nonzero__(self): for r in self: @@ -2307,9 +2307,14 @@ self._subset.reverse() self._ascending = not self._ascending -class addset(object): - """Wrapper structure for lazily adding two structures without losing much +class _addset(object): + """Represent the addition of two sets + + Wrapper structure for lazily adding two structures without losing much performance on the __contains__ method + + This class does not duck-type baseset and it's only supposed to be used + internally """ def __init__(self, revs1, revs2): self._r1 = revs1 @@ -2495,7 +2500,7 @@ return orderedlazyset(self, lambda r: r not in x, ascending=False) def __add__(self, x): - return lazyset(addset(self, x)) + return lazyset(_addset(self, x)) def __len__(self): if not self._hiddenrevs: