# HG changeset patch # User Pierre-Yves David # Date 2014-10-03 05:12:22 # Node ID eccf9907b8449a6c2bfd95539e6b583c99c50782 # Parent 6bbc26adcc6a2d494b23cd5edc402eb5375e033b addset: add a __nonzero__ method This is required to be a full smartset (not sure what was happening before that...) diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2577,6 +2577,9 @@ class _addset(_orderedsetmixin): def __len__(self): return len(self._list) + def __nonzero__(self): + return bool(self._r1 or self._r2) + @util.propertycache def _list(self): if not self._genlist: