# HG changeset patch # User Augie Fackler # Date 2018-01-18 01:08:40 # Node ID 56891a79001298c3b50dc156bbc92b27245c528f # Parent 555bc4ab37ade181e46b01be5c2fb1f589e03345 commands: replace map() with list comprehension This will work identically on Python 2 and 3. Differential Revision: https://phab.mercurial-scm.org/D1886 diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1219,7 +1219,7 @@ def bundle(ui, repo, fname, dest=None, * raise error.Abort(_("--base is incompatible with specifying " "a destination")) common = [repo.lookup(rev) for rev in base] - heads = map(repo.lookup, revs) if revs else None + heads = [repo.lookup(r) for r in revs] if revs else None outgoing = discovery.outgoing(repo, common, heads) else: dest = ui.expandpath(dest or 'default-push', dest or 'default')