[PATCH] revlog: use pycompat.maplist to eagerly evaluate map on Python 3

Augie Fackler raf at durin42.com
Tue Mar 21 21:40:02 UTC 2017


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1490132389 14400
#      Tue Mar 21 17:39:49 2017 -0400
# Node ID c4547c92a05c9efcf779846f02c1308d1b09ed11
# Parent  e245da2a41b16b28ac48d85e8f70f1216de6e074
revlog: use pycompat.maplist to eagerly evaluate map on Python 3

According to Pulkit, this should fix `hg status --all` on Python 3.

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -943,7 +943,7 @@ class revlog(object):
             ancs = self.index.commonancestorsheads(a, b)
         except (AttributeError, OverflowError): # C implementation failed
             ancs = ancestor.commonancestorsheads(self.parentrevs, a, b)
-        return map(self.node, ancs)
+        return pycompat.maplist(self.node, ancs)
 
     def isancestor(self, a, b):
         """return True if node a is an ancestor of node b


More information about the Mercurial-devel mailing list