Mercurial > public > mercurial-scm > hg-stable
diff mercurial/copies.py @ 29216:ead25aa27a43
py3: convert to next() function
next(..) was introduced in py2.6 and .next() is not available in py3
https://docs.python.org/2/library/functions.html#next
author | timeless <timeless@mozdev.org> |
---|---|
date | Mon, 16 May 2016 21:30:53 +0000 |
parents | d4247c306d82 |
children | 12cac1e4d6d9 |
line wrap: on
line diff
--- a/mercurial/copies.py Mon May 16 21:30:32 2016 +0000 +++ b/mercurial/copies.py Mon May 16 21:30:53 2016 +0000 @@ -484,16 +484,16 @@ f1r, f2r = f1.linkrev(), f2.linkrev() if f1r is None: - f1 = g1.next() + f1 = next(g1) if f2r is None: - f2 = g2.next() + f2 = next(g2) while True: f1r, f2r = f1.linkrev(), f2.linkrev() if f1r > f2r: - f1 = g1.next() + f1 = next(g1) elif f2r > f1r: - f2 = g2.next() + f2 = next(g2) elif f1 == f2: return f1 # a match elif f1r == f2r or f1r < limit or f2r < limit: