comparison tests/test-extension.t @ 38787:5199c5b6fd29

dispatch: don't show list of commands on bogus command If a command is ambiguous, you get this: $ hg ve hg: command 've' is ambiguous: verify version [255] If you typo a command, you get this: $ hg comit hg: unknown command 'comit' (did you mean one of commit, incoming, mycommit?) [255] But if you completely mistype a command so it no longer looks like any existing commands, you get a full list of commands. That might be useful the first time you use Mercurial, but after that it's probably more annoying than help, especially if you have the pager enabled and have a short terminal. Let's instead give a short hint telling the user to run `hg help` for more help. Differential Revision: https://phab.mercurial-scm.org/D4024
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 24 Jul 2018 10:22:07 -0700
parents b86664c81833
children f2e645dc6a67
comparison
equal deleted inserted replaced
38786:28d8b5f49b4d 38787:5199c5b6fd29
1681 1681
1682 $ hg deprecatedcmd > /dev/null 1682 $ hg deprecatedcmd > /dev/null
1683 *** failed to import extension deprecatedcmd from $TESTTMP/deprecated/deprecatedcmd.py: missing attributes: norepo, optionalrepo, inferrepo 1683 *** failed to import extension deprecatedcmd from $TESTTMP/deprecated/deprecatedcmd.py: missing attributes: norepo, optionalrepo, inferrepo
1684 *** (use @command decorator to register 'deprecatedcmd') 1684 *** (use @command decorator to register 'deprecatedcmd')
1685 hg: unknown command 'deprecatedcmd' 1685 hg: unknown command 'deprecatedcmd'
1686 (use 'hg help' for a list of commands)
1686 [255] 1687 [255]
1687 1688
1688 the extension shouldn't be loaded at all so the mq works: 1689 the extension shouldn't be loaded at all so the mq works:
1689 1690
1690 $ hg qseries --config extensions.mq= > /dev/null 1691 $ hg qseries --config extensions.mq= > /dev/null