changeset 36299:238646784294

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
author Augie Fackler <augie@google.com>
date Sun, 18 Feb 2018 00:43:50 -0500
parents b1c713ab785d
children 413c179cf7d5
files contrib/synthrepo.py hgext/convert/subversion.py hgext/rebase.py
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/synthrepo.py	Sun Feb 18 00:35:37 2018 -0500
+++ b/contrib/synthrepo.py	Sun Feb 18 00:43:50 2018 -0500
@@ -381,7 +381,7 @@
         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:
--- a/hgext/convert/subversion.py	Sun Feb 18 00:35:37 2018 -0500
+++ b/hgext/convert/subversion.py	Sun Feb 18 00:43:50 2018 -0500
@@ -384,7 +384,7 @@
 
     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:
--- a/hgext/rebase.py	Sun Feb 18 00:35:37 2018 -0500
+++ b/hgext/rebase.py	Sun Feb 18 00:43:50 2018 -0500
@@ -589,7 +589,7 @@
                         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():