# HG changeset patch # User Pierre-Yves David # Date 2022-01-28 13:23:37 # Node ID 937998e43e93d844f55c470f504d9daa1afcac31 # Parent fba2d7fab11e05e41b14755c4b6cff9130c1b8b4 merge: break up a not-so-one-liner for readability Differential Revision: https://phab.mercurial-scm.org/D12101 diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -41,10 +41,9 @@ def _getcheckunknownconfig(repo, section valid = [b'abort', b'ignore', b'warn'] if config not in valid: validstr = b', '.join([b"'" + v + b"'" for v in valid]) - raise error.ConfigError( - _(b"%s.%s not valid ('%s' is none of %s)") - % (section, name, config, validstr) - ) + msg = _(b"%s.%s not valid ('%s' is none of %s)") + msg %= (section, name, config, validstr) + raise error.ConfigError(msg) return config