comparison mercurial/commands.py @ 35826:555bc4ab37ad

commands: rewrite legacy ternary operator hack using modern syntax Differential Revision: https://phab.mercurial-scm.org/D1885
author Augie Fackler <augie@google.com>
date Wed, 17 Jan 2018 20:07:53 -0500
parents 373fb3f5922c
children 56891a790012
comparison
equal deleted inserted replaced
35825:c3ebe69f6391 35826:555bc4ab37ad
1217 if base: 1217 if base:
1218 if dest: 1218 if dest:
1219 raise error.Abort(_("--base is incompatible with specifying " 1219 raise error.Abort(_("--base is incompatible with specifying "
1220 "a destination")) 1220 "a destination"))
1221 common = [repo.lookup(rev) for rev in base] 1221 common = [repo.lookup(rev) for rev in base]
1222 heads = revs and map(repo.lookup, revs) or None 1222 heads = map(repo.lookup, revs) if revs else None
1223 outgoing = discovery.outgoing(repo, common, heads) 1223 outgoing = discovery.outgoing(repo, common, heads)
1224 else: 1224 else:
1225 dest = ui.expandpath(dest or 'default-push', dest or 'default') 1225 dest = ui.expandpath(dest or 'default-push', dest or 'default')
1226 dest, branches = hg.parseurl(dest, opts.get('branch')) 1226 dest, branches = hg.parseurl(dest, opts.get('branch'))
1227 other = hg.peer(repo, opts, dest) 1227 other = hg.peer(repo, opts, dest)