# HG changeset patch # User Augie Fackler # Date 2018-02-18 05:43:50 # Node ID 238646784294bb1700c1230ee5cff642464d43c3 # Parent b1c713ab785d26889c210c261c983925c58502cb py3: use default dict iterator instead of iterkeys These are the easy cases. Some cases in manifest.py will require more careful inspection. Differential Revision: https://phab.mercurial-scm.org/D2315 diff --git a/contrib/synthrepo.py b/contrib/synthrepo.py --- a/contrib/synthrepo.py +++ b/contrib/synthrepo.py @@ -381,7 +381,7 @@ def synthesize(ui, repo, descpath, **opt ui.progress(_synthesizing, None) message = 'synthesized wide repo with %d files' % (len(files),) mc = context.memctx(repo, [pctx.node(), nullid], message, - files.iterkeys(), filectxfn, ui.username(), + files, filectxfn, ui.username(), '%d %d' % util.makedate()) initnode = mc.commit() if ui.debugflag: diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py --- a/hgext/convert/subversion.py +++ b/hgext/convert/subversion.py @@ -384,7 +384,7 @@ class svn_source(converter_source): def setrevmap(self, revmap): lastrevs = {} - for revid in revmap.iterkeys(): + for revid in revmap: uuid, module, revnum = revsplit(revid) lastrevnum = lastrevs.setdefault(module, revnum) if revnum > lastrevnum: diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -589,7 +589,7 @@ class rebaseruntime(object): date=self.date) if newnode is not None: newrev = repo[newnode].rev() - for oldrev in self.state.iterkeys(): + for oldrev in self.state: self.state[oldrev] = newrev if 'qtip' in repo.tags():