# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-06-18 10:36:01 # Node ID 365a78daf735a5f0310bda7eac4dbeb628a78e2e # Parent 96ee5276340a967c07ded7dd579adaa6a9c09329 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 diff --git a/hgext/transplant.py b/hgext/transplant.py --- a/hgext/transplant.py +++ b/hgext/transplant.py @@ -682,7 +682,7 @@ def _dotransplant(ui, repo, *revs, **opt 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 @@ def _dotransplant(ui, repo, *revs, **opt 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 @@ def _dotransplant(ui, repo, *revs, **opt 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):