abrt version: 1.1.14 architecture: x86_64 cmdline: /usr/bin/python /usr/bin/hg otu component: mercurial executable: /usr/bin/hg kernel: 2.6.34.7-63.fc13.x86_64 package: mercurial-1.7.2-1.fc13 reason: cmdutil.py:28:findpossible:AttributeError: 'NoneType' object has no attribute 'keys' release: Fedora release 13 (Goddard) time: 1292363109 uid: 500 backtrace ----- cmdutil.py:28:findpossible:AttributeError: 'NoneType' object has no attribute 'keys' Traceback (most recent call last): File "/usr/bin/hg", line 38, in <module> mercurial.dispatch.run() File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 16, in run sys.exit(dispatch(sys.argv[1:])) File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 36, in dispatch return _runcatch(u, args) File "/usr/lib64/python2.6/site-packages/mercurial/dispatch.py", line 116, in _runcatch commands.help_(ui, inst.args[0], unknowncmd=True) File "/usr/lib64/python2.6/site-packages/mercurial/commands.py", line 2059, in help_ f(name) File "/usr/lib64/python2.6/site-packages/mercurial/commands.py", line 2038, in helpextcmd cmd, ext, mod = extensions.disabledcmd(name, ui.config('ui', 'strict')) File "/usr/lib64/python2.6/site-packages/mercurial/extensions.py", line 286, in disabledcmd ext = findcmd(cmd, name, path) File "/usr/lib64/python2.6/site-packages/mercurial/extensions.py", line 266, in findcmd getattr(mod, 'cmdtable', {}), strict) File "/usr/lib64/python2.6/site-packages/mercurial/cmdutil.py", line 51, in findcmd choice = findpossible(cmd, table, strict) File "/usr/lib64/python2.6/site-packages/mercurial/cmdutil.py", line 28, in findpossible for e in table.keys(): AttributeError: 'NoneType' object has no attribute 'keys' Local variables in innermost frame: cmd: 'otu' strict: None choice: {} table: None debugchoice: {} How to reproduce ----- 1. Type an unknown hg command, for example "hg foo" 2. Crash
Created attachment 468709 [details] File: backtrace
This must have been caused by an invalid extension. Please check "hg showconfig --debug extensions" and see if the problem goes away by disabling one of the extensions.
$ hg showconfig --debug extensions read config from: /usr/etc/mercurial/hgrc read config from: /etc/mercurial/hgrc read config from: /etc/mercurial/hgrc.d/mergetools.rc read config from: /home/scop/.hgrc /home/scop/.hgrc:5: extensions.hgext.convert= /home/scop/.hgrc:6: extensions.hgext.fetch= If I read that correctly, I have the convert and fetch extensions enabled. Disabling them does not make any difference, it still backtraces the same way with "hg foo". $ hg showconfig --debug extensions read config from: /usr/etc/mercurial/hgrc read config from: /etc/mercurial/hgrc read config from: /etc/mercurial/hgrc.d/mergetools.rc read config from: /home/scop/.hgrc $ hg foo hg: unknown command 'foo' Traceback (most recent call last): File "/usr/bin/hg", line 38, in <module> mercurial.dispatch.run() [...same backtrace as before...]
Hmm, yeah. When the command isn't found it tries to load all extensions even though they haven't been enabled to see if the command is defined by any of these. Can you try to add some debugging to mercurial/extensions.py around line 260 and print cmd, name and path and see when the problem happens? Is there some extension-like file somewhere with some special content that makes it bail out?
I didn't add any debugging yet, but removed the mercurial-forest extension I had installed and that got rid of the problem (source and binary rpms at http://cachalot.mine.nu/ if you're interested). Seems to me that hg should be more careful when doing what it does for unknown commands; disabled extensions might be disabled for a reason after all :)
http://hg.intevation.org/mercurial/crew/rev/1aea66b71f4f has been committed upstream and will be included in Mercurial 1.8.