comparison tests/test-extension.t @ 21289:c3784e3c3e8d

help: suggest keyword search when no topic is found When `hg help foobar` fails, it now suggests using `hg help --keyword foobar` instead of printing a full page of basic commands. This should greatly increases discoverability of the `hg help --keyword` argument.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 16 Apr 2014 19:55:40 -0400
parents 51e5c793a9f4
children 26d2fb899637
comparison
equal deleted inserted replaced
21288:eb6eaef7ae44 21289:c3784e3c3e8d
619 $ cat > hgext/forest.py <<EOF 619 $ cat > hgext/forest.py <<EOF
620 > cmdtable = None 620 > cmdtable = None
621 > EOF 621 > EOF
622 $ hg --config extensions.path=./path.py help foo > /dev/null 622 $ hg --config extensions.path=./path.py help foo > /dev/null
623 warning: error finding commands in $TESTTMP/hgext/forest.py (glob) 623 warning: error finding commands in $TESTTMP/hgext/forest.py (glob)
624 hg: unknown command 'foo' 624 abort: no such help topic: foo
625 warning: error finding commands in $TESTTMP/hgext/forest.py (glob) 625 (try "hg help --keyword foo")
626 [255] 626 [255]
627 627
628 $ cat > throw.py <<EOF 628 $ cat > throw.py <<EOF
629 > from mercurial import cmdutil, commands 629 > from mercurial import cmdutil, commands
630 > cmdtable = {} 630 > cmdtable = {}