From patchwork Sun Mar 19 18:26:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [07, of, 10, py3] dirstate: use future-proof next(iter) instead of iter.next From: Augie Fackler X-Patchwork-Id: 19455 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Sun, 19 Mar 2017 14:26:20 -0400 # HG changeset patch # User Augie Fackler # Date 1489900097 14400 # Sun Mar 19 01:08:17 2017 -0400 # Node ID d5e20f704fd722dbf8b0a011b3c9ab7437b4ac82 # Parent b9f5a75f7ca098d588feea0737fdb0ac1162cb41 dirstate: use future-proof next(iter) instead of iter.next The latter has been removed in Python 3. diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -1115,9 +1115,9 @@ class dirstate(object): else: # We may not have walked the full directory tree above, # so stat and check everything we missed. - nf = iter(visit).next + iv = iter(visit) for st in util.statfiles([join(i) for i in visit]): - results[nf()] = st + results[next(iv)] = st return results def status(self, match, subrepos, ignored, clean, unknown):