# HG changeset patch # User timeless # Date 2016-05-16 21:30:32 # Node ID f5983805574e93eb002800ea3e909992bbb5cb03 # Parent ceca932c080d0de52ece0e8dd0226f006c7b9cb1 revset: rename variable to avoid shadowing with builtin next() function https://docs.python.org/2/library/functions.html#next diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2824,11 +2824,11 @@ def _iterordered(ascending, iter1, iter2 val1 = iter1.next() if val2 is None: val2 = iter2.next() - next = choice(val1, val2) - yield next - if val1 == next: + n = choice(val1, val2) + yield n + if val1 == n: val1 = None - if val2 == next: + if val2 == n: val2 = None except StopIteration: # Flush any remaining values and consume the other one