[PATCH 0 of 2] help/dispatch: provide help for disabled extensions

Brodie Rao dackze at gmail.com
Sat Dec 5 19:19:50 UTC 2009


The first patch fixes hg help for invalid aliases. It's not strictly related
to the second patch, but it's something I ran into while working.

The second patch provides more useful error messages when the user tries
to run a command from a disabled extension in hgext (hg help also responds
similarly).

Martin and I have been discussing this idea on IRC, and it turns it wasn't
that hard to implement. However, one thing to keep in mind is that this
can potentially import every extension while searching cmdtables. This
shouldn't be an issue as long as hgext extensions don't have side effects
on import (none do at the moment).

One command this doesn't work with is record's qrecord command, which is
added in the extension's setup. If it's not a big deal, record could be
modified so it has qrecord in cmdtable by default, and removes it if
mq isn't present, or presents an error message when it's used and mq is
disabled.


More information about the Mercurial-devel mailing list