Mercurial > hg
diff mercurial/extensions.py @ 48360:e4acdf5d94a2
extensions: highlight the name of the faulty extensions in the error message
This make it easier to understand the message when the extensions name is
common.
Differential Revision: https://phab.mercurial-scm.org/D11821
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 29 Nov 2021 13:09:04 +0100 |
parents | e4e2ce328599 |
children | 0d0ce2529540 |
line wrap: on
line diff
--- a/mercurial/extensions.py Fri Nov 26 16:55:34 2021 +0100 +++ b/mercurial/extensions.py Mon Nov 29 13:09:04 2021 +0100 @@ -307,10 +307,12 @@ except Exception as inst: msg = stringutil.forcebytestr(inst) if path: - error_msg = _(b"failed to import extension %s from %s: %s") + error_msg = _( + b'failed to import extension "%s" from %s: %s' + ) error_msg %= (name, path, msg) else: - error_msg = _(b"failed to import extension %s: %s") + error_msg = _(b'failed to import extension "%s": %s') error_msg %= (name, msg) ui.warn((b"*** %s\n") % error_msg) if isinstance(inst, error.Hint) and inst.hint: