dagutil: use a listcomp instead of a map()
authorAugie Fackler <augie@google.com>
Sun, 15 Oct 2017 00:37:24 -0400
changeset 34728 09397d0dd3b7
parent 34727 a652b7763f66
child 34729 6f532c1a4af0
dagutil: use a listcomp instead of a map() In Python 3, the map() returns a generator object instead of a list, and some parts of hg depend on this being consumable more than once or sortable in place. Differential Revision: https://phab.mercurial-scm.org/D1099
mercurial/dagutil.py
--- a/mercurial/dagutil.py	Sat Oct 14 12:03:42 2017 -0400
+++ b/mercurial/dagutil.py	Sun Oct 15 00:37:24 2017 -0400
@@ -148,7 +148,7 @@
                     if (r is not None
                         and r != nullrev
                         and r not in rl.filteredrevs)]
-        return map(self._internalize, ids)
+        return [self._internalize(i) for i in ids]
 
 
 class revlogdag(revlogbaseddag):