commands: rewrite legacy ternary operator hack using modern syntax
authorAugie Fackler <augie@google.com>
Wed, 17 Jan 2018 20:07:53 -0500
changeset 35866 555bc4ab37ad
parent 35865 c3ebe69f6391
child 35867 56891a790012
commands: rewrite legacy ternary operator hack using modern syntax Differential Revision: https://phab.mercurial-scm.org/D1885
mercurial/commands.py
--- a/mercurial/commands.py	Wed Jan 17 20:07:25 2018 -0500
+++ b/mercurial/commands.py	Wed Jan 17 20:07:53 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 = revs and map(repo.lookup, revs) or None
+        heads = map(repo.lookup, revs) if revs else None
         outgoing = discovery.outgoing(repo, common, heads)
     else:
         dest = ui.expandpath(dest or 'default-push', dest or 'default')