Mercurial > evolve
changeset 4738:45508676ed00
py3: replace iter.next() by next(iter)
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 11 Jul 2019 14:21:23 -0700 |
parents | 46c990705a96 |
children | ce6e69b2f759 |
files | hgext3rd/evolve/evolvecmd.py hgext3rd/evolve/obshistory.py hgext3rd/evolve/stablerange.py hgext3rd/evolve/templatekw.py |
diffstat | 4 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py Thu Jul 11 14:16:48 2019 -0700 +++ b/hgext3rd/evolve/evolvecmd.py Thu Jul 11 14:21:23 2019 -0700 @@ -204,7 +204,7 @@ msg = _('skipping %s : we do not handle merge yet\n') % bumped ui.write_err(msg) return (False, ".") - prec = repo.set('last(allpredecessors(%d) and public())', bumped.rev()).next() + prec = next(repo.set('last(allpredecessors(%d) and public())', bumped.rev())) # For now we deny target merge if len(prec.parents()) > 1: msg = _('skipping: %s: public version is a merge, '
--- a/hgext3rd/evolve/obshistory.py Thu Jul 11 14:16:48 2019 -0700 +++ b/hgext3rd/evolve/obshistory.py Thu Jul 11 14:21:23 2019 -0700 @@ -793,7 +793,7 @@ def _getdifflines(iterdiff): """return a cleaned up lines""" try: - lines = iterdiff.next() + lines = next(iterdiff) except StopIteration: return None return _prepare_hunk(lines)
--- a/hgext3rd/evolve/stablerange.py Thu Jul 11 14:16:48 2019 -0700 +++ b/hgext3rd/evolve/stablerange.py Thu Jul 11 14:21:23 2019 -0700 @@ -764,7 +764,7 @@ if value is None: revs = self.revsfromrange(repo, (merge, 0)) i = reversed(revs) - i.next() # pop the merge + next(i) # pop the merge expected = len(revs) - 1 # Since we do warmup properly, we can expect the cache to be hot # for everythin under the merge we investigate