[PATCH 2 of 2] dispatch: provide help for disabled extensions and commands

Nicolas Dumazet nicdumz at gmail.com
Sat Dec 5 20:24:10 CST 2009


Hey Brodie!

2009/12/6 Brodie Rao <dackze at gmail.com>:

> Before a command is declared unknown, the cmdtable of each extension in
> hgext is searched, starting with hgext.<cmdname>, and then every other
> extension. If there's a match, a help message suggesting the appropriate
> extension and how to enable them is printed.
>
> Every extension could potentially be imported, but for cases like rebase,
> relink, etc. only one extension is imported.
>

I'm not sure. I really like the idea, it's a good feature.
But... well, "hg nonexisting" will import all extensions in the path,
right? I'm not sure that we want this.
Is it significantly slower?


I'm not sure of what is happening here, but the test fails here :
ERROR: test-extension output changed
--- Expected output
+++ Test output
@@ -104,13 +104,13 @@
 use "hg help extensions" for information on enabling extensions
 'qdelete' is provided by the following extension:

- mq   manage a stack of patches
+ inotify   manage a stack of patches

 use "hg help extensions" for information on enabling extensions
 hg: unknown command 'qdel'
 'qdelete' is provided by the following extension:

- mq   manage a stack of patches
+ inotify   manage a stack of patches

 use "hg help extensions" for information on enabling extensions
 % disabled extension
!
Failed test-extension: output changed


Also, I tried "hg help inserve" with inotify extension disabled, and I
get the generic help text, meaning that the command is not found. I
guess it's because you have to import inotify/__init__.py ?
Could you make sure this case is added to the test too?

Thanks!

-- 
Nicolas Dumazet — NicDumZ


More information about the Mercurial-devel mailing list