py3: fix map() use in templatekw.showpredecessors()
authorYuya Nishihara <yuya@tcha.org>
Thu, 14 Jun 2018 20:29:27 +0900
changeset 38306 523f64466a05
parent 38305 1445b556e9d2
child 38307 519b46a8f4d2
py3: fix map() use in templatekw.showpredecessors() Now it matters since hybrid.tobool() no longer consumes the generator.
mercurial/templatekw.py
--- a/mercurial/templatekw.py	Thu Jun 14 20:09:54 2018 +0900
+++ b/mercurial/templatekw.py	Thu Jun 14 20:29:27 2018 +0900
@@ -567,7 +567,7 @@
     repo = context.resource(mapping, 'repo')
     ctx = context.resource(mapping, 'ctx')
     predecessors = sorted(obsutil.closestpredecessors(repo, ctx.node()))
-    predecessors = map(hex, predecessors)
+    predecessors = pycompat.maplist(hex, predecessors)
 
     return _hybrid(None, predecessors,
                    lambda x: {'ctx': repo[x]},