Mercurial > hg > mercurial-crew-with-dirclash
changeset 3990:96e21337dc03
Improved error message for extensions overriding commands (with test):
- Old text "module foo overrides bar" was misread as overriding module bar.
- Only print a single warning line per extension instead of one for each
command.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Tue, 26 Dec 2006 15:33:50 +0100 |
parents | e492ab235b4d |
children | da3dc89f1e9a |
files | mercurial/commands.py tests/test-bad-extension tests/test-bad-extension.out |
diffstat | 3 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3053,9 +3053,10 @@ def load_extensions(ui): if uisetup: uisetup(ui) cmdtable = getattr(mod, 'cmdtable', {}) - for t in cmdtable: - if t in table: - ui.warn(_("module %s overrides %s\n") % (name, t)) + overrides = [cmd for cmd in cmdtable if cmd in table] + if overrides: + ui.warn(_("extension '%s' overrides commands: %s\n") + % (name, " ".join(overrides))) table.update(cmdtable) def parseconfig(config):