[Bug 4098] New: "hg help -k foo" may not work as intended
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Fri Nov 15 05:26:39 UTC 2013
http://bz.selenic.com/show_bug.cgi?id=4098
Priority: normal
Bug ID: 4098
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: "hg help -k foo" may not work as intended
Severity: bug
Classification: Unclassified
OS: Windows
Reporter: shunichi.goto at gmail.com
Hardware: PC
Status: UNCONFIRMED
Version: 2.8
Component: Mercurial
Product: Mercurial
When invoking help command with option '-k' on hg.exe + windows XP environment,
it causes error and shows following traceback:
{{{
[c:\develop\hg]hg help -k foo
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.7 (r267:88850, Jun 27 2011, 13:56:33) [MSC v.1500 32 bit (Intel)]
** Mercurial Distributed SCM (version 2.8+20-c68ab8cb4aaa)
** Extensions loaded: win32text, schemes, color, relink, share, notify, churn,
c
hildren, transplant, purge, graphlog, gpg, hgk, progress
Traceback (most recent call last):
File "hg", line 38, in <module>
File "mercurial\dispatch.pyc", line 34, in run
File "mercurial\dispatch.pyc", line 75, in dispatch
File "mercurial\dispatch.pyc", line 139, in _runcatch
File "mercurial\dispatch.pyc", line 812, in _dispatch
File "mercurial\dispatch.pyc", line 591, in runcommand
File "mercurial\dispatch.pyc", line 903, in _runcommand
File "mercurial\dispatch.pyc", line 874, in checkargs
File "mercurial\dispatch.pyc", line 809, in <lambda>
File "mercurial\util.pyc", line 512, in check
File "mercurial\commands.pyc", line 3410, in help_
File "mercurial\help.pyc", line 471, in help_
File "mercurial\help.pyc", line 109, in topicmatch
File "mercurial\extensions.pyc", line 85, in load
AttributeError: 'NoneType' object has no attribute 'debug'
}}}
This is because help.topicmatch() passes None as ui argument
on calling extensions.load().
Ok, I changed the line like this:
{{{
except ImportError, err:
if ui:
ui.debug('could not import hgext.%s (%s): trying %s\n'
% (name, err, name))
}}}
So "hg help -k foo" seems to success but it shows strange error message:
{{{
[c:\home\gotoh]hg26 help -k abc
abort: No module named inotify!
}}}
Note that my ~/.hgrc does not enable inotify extension.
It is same result with empty .hgrc and out of repository.
This is because extensions.disabled() returns all the modules in
hgext.__index__.py and topicmatch() try to load all of them wihtout
error handling.
This is because topicmatch() try to load all of the modules
listed in hgext.__index__.py via extensions.disabled().
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list