diff mercurial/dispatch.py @ 32566:1b90036f42f0

help: pass commands module by argument This removes import cycle.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 21 May 2017 16:57:32 +0900
parents 71e735bd8170
children 3ce53a499334
line wrap: on
line diff
--- a/mercurial/dispatch.py	Mon May 29 06:06:13 2017 -0700
+++ b/mercurial/dispatch.py	Sun May 21 16:57:32 2017 +0900
@@ -333,7 +333,8 @@
         try:
             # check if the command is in a disabled extension
             # (but don't check for extensions themselves)
-            formatted = help.formattedhelp(ui, inst.args[0], unknowncmd=True)
+            formatted = help.formattedhelp(ui, commands, inst.args[0],
+                                           unknowncmd=True)
             ui.warn(nocmdmsg)
             ui.write(formatted)
         except (error.UnknownCommand, error.Abort):