changeset 34728:09397d0dd3b7

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
author Augie Fackler <augie@google.com>
date Sun, 15 Oct 2017 00:37:24 -0400
parents a652b7763f66
children 6f532c1a4af0
files mercurial/dagutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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):