Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 32599: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 | 3b569745af6c |
children | 746e12a767b3 |
line wrap: on
line diff
--- a/mercurial/commands.py Mon May 29 06:06:13 2017 -0700 +++ b/mercurial/commands.py Sun May 21 16:57:32 2017 +0900 @@ -11,6 +11,7 @@ import errno import os import re +import sys from .i18n import _ from .node import ( @@ -2745,7 +2746,8 @@ if ui.verbose: keep.append('verbose') - formatted = help.formattedhelp(ui, name, keep=keep, **opts) + commands = sys.modules[__name__] + formatted = help.formattedhelp(ui, commands, name, keep=keep, **opts) ui.pager('help') ui.write(formatted)