narrowbundle2: replace map() with equivalent list comprehension
authorAugie Fackler <augie@google.com>
Wed, 21 Feb 2018 19:11:11 -0800
changeset 36349 658d694a656e
parent 36348 f3b9377d6aea
child 36350 ff7a19ad7aa3
narrowbundle2: replace map() with equivalent list comprehension The result of this gets used as a list in core code, so the generator returned by map() on Python 3 is a problem. Differential Revision: https://phab.mercurial-scm.org/D2369
hgext/narrow/narrowbundle2.py
--- a/hgext/narrow/narrowbundle2.py	Wed Feb 21 11:58:41 2018 -0500
+++ b/hgext/narrow/narrowbundle2.py	Wed Feb 21 19:11:11 2018 -0800
@@ -123,7 +123,7 @@
     missing = list(cl.findmissingrevs(common=commonrevs, heads=headsrevs))
     visit = reversed(missing)
     relevant_nodes = set()
-    visitnodes = map(cl.node, missing)
+    visitnodes = [cl.node(m) for m in missing]
     required = set(headsrevs) | known
     for rev in visit:
         clrev = cl.changelogrevision(rev)