Error when using hgforest with mq extension

Issue #2 resolved
schlosna
created an issue

When using hg 1.7 the mq extension along with hgforest extension, I'm encountering the error below. I've attached a simple patch that resolves this for hg 1.7. I haven't tested on prior version of mercurial.

Steps to recreate: * Setup .hgrc to use hgforest and mq extensions: {{{

!python

[extensions]
mq =
forest = /Users/david/Documents/dev/hgforest/forest.py

}}}

  • Run any hg command {{{

!bash

$ hg status

}}}

  • Receive error below {{{

!bash

** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.6 (r266:84292, Sep 18 2010, 16:05:50) [GCC 4.2.1 (Apple Inc. build 5664)]
** Mercurial Distributed SCM (version 1.7)
** Extensions loaded: fetch, purge, mq, forest, hgk, extdiff
Traceback (most recent call last):
File "/opt/local/bin/hg", line 38, in <module>
    mercurial.dispatch.run()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py", line 16, in run
    sys.exit(dispatch(sys.argv[1:]))
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py", line 36, in dispatch
    return _runcatch(u, args)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py", line 58, in _runcatch
    return _dispatch(ui, args)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py", line 492, in _dispatch
    extensions.loadall(lui)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/extensions.py", line 95, in loadall
    uisetup(ui)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/hgext/mq.py", line 3025, in uisetup
    dotable(getattr(extmodule, 'cmdtable', {}))
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/hgext/mq.py", line 3014, in dotable
    for cmd in cmdtable.keys():
AttributeError: 'NoneType' object has no attribute 'keys'

}}}

Comments (2)

  1. Log in to comment