changeset 35867:56891a790012

commands: replace map() with list comprehension This will work identically on Python 2 and 3. Differential Revision: https://phab.mercurial-scm.org/D1886
author Augie Fackler <augie@google.com>
date Wed, 17 Jan 2018 20:08:40 -0500
parents 555bc4ab37ad
children 553a98a436cf
files mercurial/commands.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Jan 17 20:07:53 2018 -0500
+++ b/mercurial/commands.py	Wed Jan 17 20:08:40 2018 -0500
@@ -1219,7 +1219,7 @@
             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')