Patchwork D1886: commands: replace map() with list comprehension

login
register
mail settings
Submitter phabricator
Date Jan. 19, 2018, 8:12 p.m.
Message ID <113790a2eebf9f179af606b873e780a4@localhost.localdomain>
Download mbox | patch
Permalink /patch/26973/
State Not Applicable
Headers show

Comments

phabricator - Jan. 19, 2018, 8:12 p.m.
durin42 updated this revision to Diff 4947.

REPOSITORY
  rHG Mercurial

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

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS




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

Patch

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')