Mercurial > hg-stable
changeset 40660:9769e0f6ffe0
py3: don't use dict.iterkeys()
dict.iterkeys() is not present on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D5262
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Tue, 13 Nov 2018 18:08:17 +0300 |
parents | 3fa4183e7803 |
children | aa588bf40a08 |
files | hgext/remotefilelog/basepack.py hgext/remotefilelog/fileserverclient.py hgext/remotefilelog/remotefilelog.py hgext/remotefilelog/repack.py |
diffstat | 4 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/remotefilelog/basepack.py Tue Nov 13 18:07:21 2018 +0300 +++ b/hgext/remotefilelog/basepack.py Tue Nov 13 18:08:17 2018 +0300 @@ -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
--- a/hgext/remotefilelog/fileserverclient.py Tue Nov 13 18:07:21 2018 +0300 +++ b/hgext/remotefilelog/fileserverclient.py Tue Nov 13 18:08:17 2018 +0300 @@ -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 - " +
--- a/hgext/remotefilelog/remotefilelog.py Tue Nov 13 18:07:21 2018 +0300 +++ b/hgext/remotefilelog/remotefilelog.py Tue Nov 13 18:08:17 2018 +0300 @@ -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()
--- a/hgext/remotefilelog/repack.py Tue Nov 13 18:07:21 2018 +0300 +++ b/hgext/remotefilelog/repack.py Tue Nov 13 18:08:17 2018 +0300 @@ -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: