# HG changeset patch # User Matt Mackall # Date 2014-08-12 09:11:32 # Node ID 9a299c39de015231a8b2b6530b3d5a6dd4eaff85 # Parent c1d93edcf0040b5111f4eb1ae24eacb8bdbf79d6 help: normalize helplist hints diff --git a/mercurial/help.py b/mercurial/help.py --- a/mercurial/help.py +++ b/mercurial/help.py @@ -369,18 +369,19 @@ def help_(ui, name, unknowncmd=False, fu rst.append('\n%s\n' % optrst(_("global options"), commands.globalopts, ui.verbose)) if name == 'shortlist': - rst.append(_('\nuse "hg help" for the full list ' - 'of commands\n')) + rst.append(_('\n(use "hg help" for the full list ' + 'of commands)\n')) else: if name == 'shortlist': - rst.append(_('\nuse "hg help" for the full list of commands ' - 'or "hg -v" for details\n')) + rst.append(_('\n(use "hg help" for the full list of commands ' + 'or "hg -v" for details)\n')) elif name and not full: - rst.append(_('\nuse "hg help %s" to show the full help ' - 'text\n') % name) + rst.append(_('\n(use "hg help %s" to show the full help ' + 'text)\n') % name) else: - rst.append(_('\nuse "hg -v help%s" to show builtin aliases and ' - 'global options\n') % (name and " " + name or "")) + rst.append(_('\n(use "hg help -v%s" to show built-in aliases ' + 'and global options)\n') + % (name and " " + name or "")) return rst def helptopic(name): diff --git a/tests/test-alias.t b/tests/test-alias.t --- a/tests/test-alias.t +++ b/tests/test-alias.t @@ -399,7 +399,7 @@ invalid global arguments for normal comm summary summarize working directory state update update working directory (or switch revisions) - use "hg help" for the full list of commands or "hg -v" for details + (use "hg help" for the full list of commands or "hg -v" for details) [255] $ hg --invalid mylog hg: option --invalid not recognized @@ -425,7 +425,7 @@ invalid global arguments for normal comm summary summarize working directory state update update working directory (or switch revisions) - use "hg help" for the full list of commands or "hg -v" for details + (use "hg help" for the full list of commands or "hg -v" for details) [255] $ hg --invalid blank hg: option --invalid not recognized @@ -451,7 +451,7 @@ invalid global arguments for normal comm summary summarize working directory state update update working directory (or switch revisions) - use "hg help" for the full list of commands or "hg -v" for details + (use "hg help" for the full list of commands or "hg -v" for details) [255] This should show id: diff --git a/tests/test-commandserver.py.out b/tests/test-commandserver.py.out --- a/tests/test-commandserver.py.out +++ b/tests/test-commandserver.py.out @@ -34,7 +34,7 @@ basic commands: summary summarize working directory state update update working directory (or switch revisions) -use "hg help" for the full list of commands or "hg -v" for details +(use "hg help" for the full list of commands or "hg -v" for details) runcommand id --quiet 000000000000 runcommand id diff --git a/tests/test-extension.t b/tests/test-extension.t --- a/tests/test-extension.t +++ b/tests/test-extension.t @@ -463,7 +463,7 @@ Extension module help vs command help: extdiff use external program to diff repository (or selected files) - use "hg -v help extdiff" to show builtin aliases and global options + (use "hg help -v extdiff" to show built-in aliases and global options) diff --git a/tests/test-globalopts.t b/tests/test-globalopts.t --- a/tests/test-globalopts.t +++ b/tests/test-globalopts.t @@ -357,7 +357,7 @@ Testing -h/--help: templating Template Usage urls URL Paths - use "hg -v help" to show builtin aliases and global options + (use "hg help -v" to show built-in aliases and global options) @@ -439,7 +439,7 @@ Testing -h/--help: templating Template Usage urls URL Paths - use "hg -v help" to show builtin aliases and global options + (use "hg help -v" to show built-in aliases and global options) Not tested: --debugger diff --git a/tests/test-help.t b/tests/test-help.t --- a/tests/test-help.t +++ b/tests/test-help.t @@ -23,7 +23,7 @@ Short help: summary summarize working directory state update update working directory (or switch revisions) - use "hg help" for the full list of commands or "hg -v" for details + (use "hg help" for the full list of commands or "hg -v" for details) $ hg -q add add the specified files on the next commit @@ -122,7 +122,7 @@ Short help: templating Template Usage urls URL Paths - use "hg -v help" to show builtin aliases and global options + (use "hg help -v" to show built-in aliases and global options) $ hg -q help add add the specified files on the next commit @@ -326,7 +326,7 @@ Test short command list with verbose opt -h --help display help and exit --hidden consider hidden changesets - use "hg help" for the full list of commands + (use "hg help" for the full list of commands) $ hg add -h hg add [OPTION]... [FILE]... @@ -441,7 +441,7 @@ Test ambiguous command help add add the specified files on the next commit addremove add all new files, delete all missing files - use "hg -v help ad" to show builtin aliases and global options + (use "hg help -v ad" to show built-in aliases and global options) Test command without options @@ -610,7 +610,7 @@ Test command without options summary summarize working directory state update update working directory (or switch revisions) - use "hg help" for the full list of commands or "hg -v" for details + (use "hg help" for the full list of commands or "hg -v" for details) [255] @@ -744,7 +744,7 @@ Test that default list of commands omits templating Template Usage urls URL Paths - use "hg -v help" to show builtin aliases and global options + (use "hg help -v" to show built-in aliases and global options) Test list of internal help commands @@ -806,7 +806,7 @@ Test list of internal help commands debugwireargs (no help text available) - use "hg -v help debug" to show builtin aliases and global options + (use "hg help -v debug" to show built-in aliases and global options) Test list of commands with command with no help text @@ -818,7 +818,7 @@ Test list of commands with command with nohelp (no help text available) - use "hg -v help helpext" to show builtin aliases and global options + (use "hg help -v helpext" to show built-in aliases and global options) test deprecated option is hidden in command help diff --git a/tests/test-mq.t b/tests/test-mq.t --- a/tests/test-mq.t +++ b/tests/test-mq.t @@ -95,7 +95,7 @@ help qtop print the name of the current patch qunapplied print the patches not yet applied - use "hg -v help mq" to show builtin aliases and global options + (use "hg help -v mq" to show built-in aliases and global options) $ hg init a $ cd a diff --git a/tests/test-strict.t b/tests/test-strict.t --- a/tests/test-strict.t +++ b/tests/test-strict.t @@ -37,7 +37,7 @@ summary summarize working directory state update update working directory (or switch revisions) - use "hg help" for the full list of commands or "hg -v" for details + (use "hg help" for the full list of commands or "hg -v" for details) [255] $ hg annotate a 0: a