Read about our upcoming Code of Conduct on this issue

Commit 2e5471f0 authored by Pierre-Yves David's avatar Pierre-Yves David 🐙
Browse files

commands: use any() instead of `if a or b or c`

Small cleanup for future when we have an option to show configs from shared rc.

Differential Revision: https://phab.mercurial-scm.org/D8658
parent 19748c73c208
......@@ -2184,7 +2184,8 @@ def config(ui, repo, *values, **opts):
"""
opts = pycompat.byteskwargs(opts)
if opts.get(b'edit') or opts.get(b'local') or opts.get(b'global'):
editopts = (b'edit', b'local', b'global')
if any(opts.get(o) for o in editopts):
if opts.get(b'local') and opts.get(b'global'):
raise error.Abort(_(b"can't use --local and --global together"))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment