diff -r f5983805574e -r ead25aa27a43 mercurial/ancestor.py --- a/mercurial/ancestor.py Mon May 16 21:30:32 2016 +0000 +++ b/mercurial/ancestor.py Mon May 16 21:30:53 2016 +0000 @@ -291,7 +291,7 @@ def __nonzero__(self): """False if the set is empty, True otherwise.""" try: - iter(self).next() + next(iter(self)) return True except StopIteration: return False