D1885: commands: rewrite legacy ternary operator hack using modern syntax
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu Jan 18 13:38:58 UTC 2018
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D1885
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
@@ -1208,7 +1208,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')
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list