# HG changeset patch # User timeless # Date 1474415266 0 # Node ID 7109d5ddeb0c5aacc361fb3351a285ccb1c37962 # Parent 4ddb05751b122b1efc3c59e49773b06aebb36fd9 help: use single quotes in use warning diff -r 4ddb05751b12 -r 7109d5ddeb0c mercurial/help.py --- a/mercurial/help.py Tue Sep 20 23:47:30 2016 +0000 +++ b/mercurial/help.py Tue Sep 20 23:47:46 2016 +0000 @@ -358,8 +358,8 @@ mod = extensions.find(name) doc = gettext(mod.__doc__) or '' if '\n' in doc.strip(): - msg = _('(use "hg help -e %s" to show help for ' - 'the %s extension)') % (name, name) + msg = _("(use 'hg help -e %s' to show help for " + "the %s extension)") % (name, name) rst.append('\n%s\n' % msg) except KeyError: pass @@ -374,7 +374,7 @@ if not ui.verbose: if not full: - rst.append(_('\n(use "hg %s -h" to show more help)\n') + rst.append(_("\n(use 'hg %s -h' to show more help)\n") % name) elif not ui.quiet: rst.append(_('\n(some details hidden, use --verbose ' @@ -450,21 +450,21 @@ rst.append('\n%s\n' % optrst(_("global options"), commands.globalopts, ui.verbose)) if name == 'shortlist': - rst.append(_('\n(use "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(_('\n(use "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(_('\n(use "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) elif name and cmds and name in cmds.keys(): - rst.append(_('\n(use "hg help -v -e %s" to show built-in ' - 'aliases and global options)\n') % name) + rst.append(_("\n(use 'hg help -v -e %s' to show built-in " + "aliases and global options)\n") % name) else: - rst.append(_('\n(use "hg help -v%s" to show built-in aliases ' - 'and global options)\n') + rst.append(_("\n(use 'hg help -v%s' to show built-in aliases " + "and global options)\n") % (name and " " + name or "")) return rst @@ -498,8 +498,8 @@ try: cmdutil.findcmd(name, commands.table) - rst.append(_('\nuse "hg help -c %s" to see help for ' - 'the %s command\n') % (name, name)) + rst.append(_("\nuse 'hg help -c %s' to see help for " + "the %s command\n") % (name, name)) except error.UnknownCommand: pass return rst @@ -536,8 +536,8 @@ modcmds = set([c.partition('|')[0] for c in ct]) rst.extend(helplist(modcmds.__contains__)) else: - rst.append(_('(use "hg help extensions" for information on enabling' - ' extensions)\n')) + rst.append(_("(use 'hg help extensions' for information on enabling" + " extensions)\n")) return rst def helpextcmd(name, subtopic=None): @@ -549,8 +549,8 @@ "extension:") % cmd, {ext: doc}, indent=4, showdeprecated=True) rst.append('\n') - rst.append(_('(use "hg help extensions" for information on enabling ' - 'extensions)\n')) + rst.append(_("(use 'hg help extensions' for information on enabling " + "extensions)\n")) return rst @@ -575,7 +575,7 @@ rst.append('\n') if not rst: msg = _('no matches') - hint = _('try "hg help" for a list of topics') + hint = _("try 'hg help' for a list of topics") raise error.Abort(msg, hint=hint) elif name and name != 'shortlist': queries = [] @@ -598,7 +598,7 @@ raise error.UnknownCommand(name) else: msg = _('no such help topic: %s') % name - hint = _('try "hg help --keyword %s"') % name + hint = _("try 'hg help --keyword %s'") % name raise error.Abort(msg, hint=hint) else: # program name diff -r 4ddb05751b12 -r 7109d5ddeb0c tests/test-alias.t --- a/tests/test-alias.t Tue Sep 20 23:47:30 2016 +0000 +++ b/tests/test-alias.t Tue Sep 20 23:47:46 2016 +0000 @@ -99,7 +99,7 @@ patchbomb command to send changesets as (a series of) patch emails - (use "hg help extensions" for information on enabling extensions) + (use 'hg help extensions' for information on enabling extensions) no definition @@ -441,7 +441,7 @@ alias for: hg root - (use "hg rt -h" to show more help) + (use 'hg rt -h' to show more help) [255] invalid global arguments for normal commands, aliases, and shell aliases @@ -470,7 +470,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 --invalid mylog hg: option --invalid not recognized @@ -496,7 +496,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 --invalid blank hg: option --invalid not recognized @@ -522,7 +522,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] environment variable changes in alias commands diff -r 4ddb05751b12 -r 7109d5ddeb0c tests/test-commandserver.t --- a/tests/test-commandserver.t Tue Sep 20 23:47:30 2016 +0000 +++ b/tests/test-commandserver.t Tue Sep 20 23:47:46 2016 +0000 @@ -78,7 +78,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) *** runcommand id --quiet 000000000000 *** runcommand id diff -r 4ddb05751b12 -r 7109d5ddeb0c tests/test-contrib-perf.t --- a/tests/test-contrib-perf.t Tue Sep 20 23:47:30 2016 +0000 +++ b/tests/test-contrib-perf.t Tue Sep 20 23:47:46 2016 +0000 @@ -105,7 +105,7 @@ benchmark the computation of various volatile set perfwalk (no help text available) - (use "hg help -v perfstatusext" to show built-in aliases and global options) + (use 'hg help -v perfstatusext' to show built-in aliases and global options) $ hg perfaddremove $ hg perfancestors $ hg perfancestorset 2 diff -r 4ddb05751b12 -r 7109d5ddeb0c tests/test-dispatch.t --- a/tests/test-dispatch.t Tue Sep 20 23:47:30 2016 +0000 +++ b/tests/test-dispatch.t Tue Sep 20 23:47:46 2016 +0000 @@ -27,7 +27,7 @@ -I --include PATTERN [+] include names matching the given patterns -X --exclude PATTERN [+] exclude names matching the given patterns - (use "hg cat -h" to show more help) + (use 'hg cat -h' to show more help) [255] [defaults] diff -r 4ddb05751b12 -r 7109d5ddeb0c tests/test-extdiff.t --- a/tests/test-extdiff.t Tue Sep 20 23:47:30 2016 +0000 +++ b/tests/test-extdiff.t Tue Sep 20 23:47:46 2016 +0000 @@ -399,14 +399,14 @@ $ HGPLAIN=1 hg --config hgext.extdiff= --config extdiff.cmd.td=hi help -k xyzzy abort: no matches - (try "hg help" for a list of topics) + (try 'hg help' for a list of topics) [255] $ HGPLAIN=1 hg --config hgext.extdiff= --config extdiff.cmd.td=hi help td > /dev/null $ LC_MESSAGES=ja_JP.UTF-8 hg --config hgext.extdiff= --config extdiff.cmd.td=$U help -k xyzzy abort: no matches - (try "hg help" for a list of topics) + (try 'hg help' for a list of topics) [255] $ LC_MESSAGES=ja_JP.UTF-8 hg --config hgext.extdiff= --config extdiff.cmd.td=$U help td \ diff -r 4ddb05751b12 -r 7109d5ddeb0c tests/test-extension.t --- a/tests/test-extension.t Tue Sep 20 23:47:30 2016 +0000 +++ b/tests/test-extension.t Tue Sep 20 23:47:46 2016 +0000 @@ -592,7 +592,7 @@ graphlog command to view revision graphs from a shell (DEPRECATED) - (use "hg help extensions" for information on enabling extensions) + (use 'hg help extensions' for information on enabling extensions) Extension module help vs command help: @@ -616,7 +616,7 @@ compared to the working directory, and, when no revisions are specified, the working directory files are compared to its parent. - (use "hg help -e extdiff" to show help for the extdiff extension) + (use 'hg help -e extdiff' to show help for the extdiff extension) options ([+] can be repeated): @@ -696,7 +696,7 @@ extdiff use external program to diff repository (or selected files) - (use "hg help -v -e extdiff" to show built-in aliases and global options) + (use 'hg help -v -e extdiff' to show built-in aliases and global options) @@ -748,7 +748,7 @@ A range acts as a closed interval. This means that a range of 3:5 gives 3, 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6. - use "hg help -c multirevs" to see help for the multirevs command + use 'hg help -c multirevs' to see help for the multirevs command @@ -770,7 +770,7 @@ multirevs command - (use "hg multirevs -h" to show more help) + (use 'hg multirevs -h' to show more help) [255] @@ -830,7 +830,7 @@ dodo Does nothing foofoo Writes 'Foo foo' - (use "hg help -v -e dodo" to show built-in aliases and global options) + (use 'hg help -v -e dodo' to show built-in aliases and global options) Make sure that '-v -e' prints list of built-in aliases along with extension help itself @@ -871,7 +871,7 @@ Does nothing - (use "hg help -e dodo" to show help for the dodo extension) + (use 'hg help -e dodo' to show help for the dodo extension) options: @@ -933,7 +933,7 @@ beep Writes 'Beep beep' something Does something - (use "hg help -v dudu" to show built-in aliases and global options) + (use 'hg help -v dudu' to show built-in aliases and global options) In case when extension name doesn't match any of its commands, help options '-v' and '-v -e' should be equivalent @@ -1011,7 +1011,7 @@ patchbomb command to send changesets as (a series of) patch emails - (use "hg help extensions" for information on enabling extensions) + (use 'hg help extensions' for information on enabling extensions) $ hg qdel @@ -1020,7 +1020,7 @@ mq manage a stack of patches - (use "hg help extensions" for information on enabling extensions) + (use 'hg help extensions' for information on enabling extensions) [255] @@ -1030,7 +1030,7 @@ churn command to display statistics about repository history - (use "hg help extensions" for information on enabling extensions) + (use 'hg help extensions' for information on enabling extensions) [255] @@ -1040,12 +1040,12 @@ $ hg help churn churn extension - command to display statistics about repository history - (use "hg help extensions" for information on enabling extensions) + (use 'hg help extensions' for information on enabling extensions) $ hg help patchbomb patchbomb extension - command to send changesets as (a series of) patch emails - (use "hg help extensions" for information on enabling extensions) + (use 'hg help extensions' for information on enabling extensions) Broken disabled extension and command: @@ -1065,7 +1065,7 @@ $ hg --config extensions.path=./path.py help broken broken extension - (no help text available) - (use "hg help extensions" for information on enabling extensions) + (use 'hg help extensions' for information on enabling extensions) $ cat > hgext/forest.py < /dev/null warning: error finding commands in $TESTTMP/hgext/forest.py (glob) abort: no such help topic: foo - (try "hg help --keyword foo") + (try 'hg help --keyword foo') [255] $ cat > throw.py <