hgext/remotefilelog/remotefilelog.py
changeset 43105 649d3ac37a12
parent 43077 687b865b95ad
child 44470 9d2b2df2c2ba
--- a/hgext/remotefilelog/remotefilelog.py	Sun Oct 06 17:59:15 2019 -0400
+++ b/hgext/remotefilelog/remotefilelog.py	Sun Oct 06 19:25:18 2019 -0400
@@ -21,6 +21,7 @@
     ancestor,
     error,
     mdiff,
+    pycompat,
     revlog,
     util,
 )
@@ -428,7 +429,7 @@
             return nullid
 
         revmap, parentfunc = self._buildrevgraph(a, b)
-        nodemap = dict(((v, k) for (k, v) in revmap.iteritems()))
+        nodemap = dict(((v, k) for (k, v) in pycompat.iteritems(revmap)))
 
         ancs = ancestor.ancestors(parentfunc, revmap[a], revmap[b])
         if ancs:
@@ -443,7 +444,7 @@
             return nullid
 
         revmap, parentfunc = self._buildrevgraph(a, b)
-        nodemap = dict(((v, k) for (k, v) in revmap.iteritems()))
+        nodemap = dict(((v, k) for (k, v) in pycompat.iteritems(revmap)))
 
         ancs = ancestor.commonancestorsheads(parentfunc, revmap[a], revmap[b])
         return map(nodemap.__getitem__, ancs)
@@ -459,7 +460,7 @@
         parentsmap = collections.defaultdict(list)
         allparents = set()
         for mapping in (amap, bmap):
-            for node, pdata in mapping.iteritems():
+            for node, pdata in pycompat.iteritems(mapping):
                 parents = parentsmap[node]
                 p1, p2, linknode, copyfrom = pdata
                 # Don't follow renames (copyfrom).