Patchwork D2315: py3: use default dict iterator instead of iterkeys

login
register
mail settings
Submitter phabricator
Date Feb. 18, 2018, 4:24 p.m.
Message ID <79929f9367f4644107f73607fad7f3c2@localhost.localdomain>
Download mbox | patch
Permalink /patch/28110/
State Not Applicable
Headers show

Comments

phabricator - Feb. 18, 2018, 4:24 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG238646784294: py3: use default dict iterator instead of iterkeys (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2315?vs=5833&id=5884

REVISION DETAIL
  https://phab.mercurial-scm.org/D2315

AFFECTED FILES
  contrib/synthrepo.py
  hgext/convert/subversion.py
  hgext/rebase.py

CHANGE DETAILS




To: durin42, #hg-reviewers, pulkit, indygreg
Cc: mercurial-devel

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -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():
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 @@ 
 
     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/contrib/synthrepo.py b/contrib/synthrepo.py
--- a/contrib/synthrepo.py
+++ b/contrib/synthrepo.py
@@ -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: