D1886: commands: replace map() with list comprehension

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Thu Feb 1 20:05:47 UTC 2018


durin42 updated this revision to Diff 5041.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1886?vs=4947&id=5041

REVISION DETAIL
  https://phab.mercurial-scm.org/D1886

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -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')



To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel


More information about the Mercurial-devel mailing list