Patchwork D5262: py3: don't use dict.iterkeys()

login
register
mail settings
Submitter phabricator
Date Nov. 13, 2018, 6:50 p.m.
Message ID <3f39304ec7f4afca5b5b63e41712149b@localhost.localdomain>
Download mbox | patch
Permalink /patch/36555/
State Not Applicable
Headers show

Comments

phabricator - Nov. 13, 2018, 6:50 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG9769e0f6ffe0: py3: don&#039;t use dict.iterkeys() (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5262?vs=12519&id=12525

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

AFFECTED FILES
  hgext/remotefilelog/basepack.py
  hgext/remotefilelog/fileserverclient.py
  hgext/remotefilelog/remotefilelog.py
  hgext/remotefilelog/repack.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/remotefilelog/repack.py b/hgext/remotefilelog/repack.py
--- a/hgext/remotefilelog/repack.py
+++ b/hgext/remotefilelog/repack.py
@@ -507,7 +507,7 @@ 
                         total=len(byfile))
 
             ancestors = {}
-            nodes = list(node for node in entries.iterkeys())
+            nodes = list(node for node in entries)
             nohistory = []
             for i, node in enumerate(nodes):
                 if node in ancestors:
@@ -643,7 +643,7 @@ 
         count = 0
         for filename, entries in sorted(byfile.iteritems()):
             ancestors = {}
-            nodes = list(node for node in entries.iterkeys())
+            nodes = list(node for node in entries)
 
             for node in nodes:
                 if node in ancestors:
diff --git a/hgext/remotefilelog/remotefilelog.py b/hgext/remotefilelog/remotefilelog.py
--- a/hgext/remotefilelog/remotefilelog.py
+++ b/hgext/remotefilelog/remotefilelog.py
@@ -419,7 +419,7 @@ 
         # Breadth first traversal to build linkrev graph
         parentrevs = collections.defaultdict(list)
         revmap = {}
-        queue = collections.deque(((None, n) for n in parentsmap.iterkeys()
+        queue = collections.deque(((None, n) for n in parentsmap
                  if n not in allparents))
         while queue:
             prevrev, current = queue.pop()
diff --git a/hgext/remotefilelog/fileserverclient.py b/hgext/remotefilelog/fileserverclient.py
--- a/hgext/remotefilelog/fileserverclient.py
+++ b/hgext/remotefilelog/fileserverclient.py
@@ -340,7 +340,7 @@ 
             missingid = cache.receiveline()
             if not missingid:
                 missedset = set(missed)
-                for missingid in idmap.iterkeys():
+                for missingid in idmap:
                     if not missingid in missedset:
                         missed.append(missingid)
                 self.ui.warn(_("warning: cache connection closed early - " +
diff --git a/hgext/remotefilelog/basepack.py b/hgext/remotefilelog/basepack.py
--- a/hgext/remotefilelog/basepack.py
+++ b/hgext/remotefilelog/basepack.py
@@ -468,7 +468,7 @@ 
         # Precompute the location of each entry
         locations = {}
         count = 0
-        for node in sorted(self.entries.iterkeys()):
+        for node in sorted(self.entries):
             location = count * self.INDEXENTRYLENGTH
             locations[node] = location
             count += 1