Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
32565:5313d98089f5 | 32566:1b90036f42f0 |
---|---|
331 except error.UnknownCommand as inst: | 331 except error.UnknownCommand as inst: |
332 nocmdmsg = _("hg: unknown command '%s'\n") % inst.args[0] | 332 nocmdmsg = _("hg: unknown command '%s'\n") % inst.args[0] |
333 try: | 333 try: |
334 # check if the command is in a disabled extension | 334 # check if the command is in a disabled extension |
335 # (but don't check for extensions themselves) | 335 # (but don't check for extensions themselves) |
336 formatted = help.formattedhelp(ui, inst.args[0], unknowncmd=True) | 336 formatted = help.formattedhelp(ui, commands, inst.args[0], |
337 unknowncmd=True) | |
337 ui.warn(nocmdmsg) | 338 ui.warn(nocmdmsg) |
338 ui.write(formatted) | 339 ui.write(formatted) |
339 except (error.UnknownCommand, error.Abort): | 340 except (error.UnknownCommand, error.Abort): |
340 suggested = False | 341 suggested = False |
341 if len(inst.args) == 2: | 342 if len(inst.args) == 2: |