Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 13191:1aea66b71f4f
extensions: warn about invalid extensions when listing disabled commands
Invalid extensions in hgext/ could in some cases cause a crash when searching
for unknown commands in disabled extensions.
With this change we issue a warning if extracting commands from the extensions
fails. Traceback is available on request.
Reported on https://bugzilla.redhat.com/show_bug.cgi?id=663183 with forest.py.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sun, 26 Dec 2010 00:43:49 +0100 |
parents | 6320101a638c |
children | 0935ff767285 |
comparison
equal
deleted
inserted
replaced
13190:5314cbb775f6 | 13191:1aea66b71f4f |
---|---|
2032 else: | 2032 else: |
2033 ui.write(_('use "hg help extensions" for information on enabling ' | 2033 ui.write(_('use "hg help extensions" for information on enabling ' |
2034 'extensions\n')) | 2034 'extensions\n')) |
2035 | 2035 |
2036 def helpextcmd(name): | 2036 def helpextcmd(name): |
2037 cmd, ext, mod = extensions.disabledcmd(name, ui.config('ui', 'strict')) | 2037 cmd, ext, mod = extensions.disabledcmd(ui, name, ui.config('ui', 'strict')) |
2038 doc = gettext(mod.__doc__).splitlines()[0] | 2038 doc = gettext(mod.__doc__).splitlines()[0] |
2039 | 2039 |
2040 msg = help.listexts(_("'%s' is provided by the following " | 2040 msg = help.listexts(_("'%s' is provided by the following " |
2041 "extension:") % cmd, {ext: doc}, len(ext), | 2041 "extension:") % cmd, {ext: doc}, len(ext), |
2042 indent=4) | 2042 indent=4) |