Mercurial > public > mercurial-scm > hg-stable
diff mercurial/help.py @ 22162:7ada34676db8
help: provide help of bad alias without executing aliascmd()
The output is slightly changed because of minirst formatting. Previously,
ui.pushbuffer() had no effect because "badalias" message was written to stderr.
"if not unknowncmd" should no longer be needed because there's no call loop.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 13 Aug 2014 19:38:47 +0900 |
parents | 645457f73aa6 |
children | c5df4af17110 |
line wrap: on
line diff
--- a/mercurial/help.py Wed Aug 13 19:28:42 2014 +0900 +++ b/mercurial/help.py Wed Aug 13 19:38:47 2014 +0900 @@ -236,10 +236,12 @@ # check if it's an invalid alias and display its error if it is if getattr(entry[0], 'badalias', None): - if not unknowncmd: - ui.pushbuffer() - entry[0](ui) - rst.append(ui.popbuffer()) + rst.append(entry[0].badalias + '\n') + if entry[0].unknowncmd: + try: + rst.extend(helpextcmd(entry[0].cmdname)) + except error.UnknownCommand: + pass return rst # synopsis