changeset 38369:365a78daf735

py3: use pycompat.maplist() instead of map() in hgext/transplant.py map() returns a map-object on Python3 instead of a list. Differential Revision: https://phab.mercurial-scm.org/D3791
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 18 Jun 2018 16:06:01 +0530
parents 96ee5276340a
children c7eb9bce6041
files hgext/transplant.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/transplant.py	Mon Jun 18 15:50:15 2018 +0530
+++ b/hgext/transplant.py	Mon Jun 18 16:06:01 2018 +0530
@@ -682,7 +682,7 @@
     sourcerepo = opts.get('source')
     if sourcerepo:
         peer = hg.peer(repo, opts, ui.expandpath(sourcerepo))
-        heads = map(peer.lookup, opts.get('branch', ()))
+        heads = pycompat.maplist(peer.lookup, opts.get('branch', ()))
         target = set(heads)
         for r in revs:
             try:
@@ -693,7 +693,7 @@
                                     onlyheads=sorted(target), force=True)
     else:
         source = repo
-        heads = map(source.lookup, opts.get('branch', ()))
+        heads = pycompat.maplist(source.lookup, opts.get('branch', ()))
         cleanupfn = None
 
     try:
@@ -708,7 +708,7 @@
             matchfn = lambda x: tf(x) and x not in prune
         else:
             matchfn = tf
-        merges = map(source.lookup, opts.get('merge', ()))
+        merges = pycompat.maplist(source.lookup, opts.get('merge', ()))
         revmap = {}
         if revs:
             for r in scmutil.revrange(source, revs):