changeset 22117:c1d93edcf004

help: fold repeatable option message into option table header This will hopefully conserve some limited user attention.
author Matt Mackall <mpm@selenic.com>
date Tue, 12 Aug 2014 04:00:42 -0500
parents 161085f87b95
children 9a299c39de01
files mercurial/help.py tests/test-dispatch.t tests/test-extdiff.t tests/test-extension.t tests/test-help.t tests/test-mq-qrefresh-interactive.t tests/test-qrecord.t tests/test-strip.t
diffstat 8 files changed, 24 insertions(+), 70 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/help.py	Tue Aug 12 03:53:33 2014 -0500
+++ b/mercurial/help.py	Tue Aug 12 04:00:42 2014 -0500
@@ -59,12 +59,12 @@
 
         data.append((so, lo, desc))
 
+    if multioccur:
+        header += (_(" ([+] can be repeated)"))
+
     rst = ['\n%s:\n\n' % header]
     rst.extend(minirst.maketable(data, 1))
 
-    if multioccur:
-        rst.append(_("\n[+] marked option can be specified multiple times\n"))
-
     return ''.join(rst)
 
 def indicateomitted(rst, omitted, notomitted=None):
--- a/tests/test-dispatch.t	Tue Aug 12 03:53:33 2014 -0500
+++ b/tests/test-dispatch.t	Tue Aug 12 04:00:42 2014 -0500
@@ -19,7 +19,7 @@
   
   output the current or given revision of files
   
-  options:
+  options ([+] can be repeated):
   
    -o --output FORMAT       print output to file with formatted name
    -r --rev REV             print the given revision
@@ -27,8 +27,6 @@
    -I --include PATTERN [+] include names matching the given patterns
    -X --exclude PATTERN [+] exclude names matching the given patterns
   
-  [+] marked option can be specified multiple times
-  
   (use "hg cat -h" to show more help)
   [255]
 
--- a/tests/test-extdiff.t	Tue Aug 12 03:53:33 2014 -0500
+++ b/tests/test-extdiff.t	Tue Aug 12 04:00:42 2014 -0500
@@ -37,7 +37,7 @@
       compared to the working directory, and, when no revisions are specified,
       the working directory files are compared to its parent.
   
-  options:
+  options ([+] can be repeated):
   
    -o --option OPT [+]      pass option to comparison program
    -r --rev REV [+]         revision
@@ -45,8 +45,6 @@
    -I --include PATTERN [+] include names matching the given patterns
    -X --exclude PATTERN [+] exclude names matching the given patterns
   
-  [+] marked option can be specified multiple times
-  
   (some details hidden, use --verbose to show complete help)
 
   $ hg ci -d '0 0' -mtest1
--- a/tests/test-extension.t	Tue Aug 12 03:53:33 2014 -0500
+++ b/tests/test-extension.t	Tue Aug 12 04:00:42 2014 -0500
@@ -301,7 +301,7 @@
   
    foo           yet another foo command
   
-  global options:
+  global options ([+] can be repeated):
   
    -R --repository REPO   repository root directory or name of overlay bundle
                           file
@@ -321,8 +321,6 @@
       --version           output version information and exit
    -h --help              display help and exit
       --hidden            consider hidden changesets
-  
-  [+] marked option can be specified multiple times
 
 
 
@@ -337,7 +335,7 @@
    debugfoobar   yet another debug command
    foo           yet another foo command
   
-  global options:
+  global options ([+] can be repeated):
   
    -R --repository REPO   repository root directory or name of overlay bundle
                           file
@@ -357,8 +355,6 @@
       --version           output version information and exit
    -h --help              display help and exit
       --hidden            consider hidden changesets
-  
-  [+] marked option can be specified multiple times
 
 
 
@@ -390,7 +386,7 @@
   
   (use "hg help -e extdiff" to show help for the extdiff extension)
   
-  options:
+  options ([+] can be repeated):
   
    -p --program CMD         comparison program to run
    -o --option OPT [+]      pass option to comparison program
@@ -399,8 +395,6 @@
    -I --include PATTERN [+] include names matching the given patterns
    -X --exclude PATTERN [+] exclude names matching the given patterns
   
-  [+] marked option can be specified multiple times
-  
   (some details hidden, use --verbose to show complete help)
 
 
--- a/tests/test-help.t	Tue Aug 12 03:53:33 2014 -0500
+++ b/tests/test-help.t	Tue Aug 12 04:00:42 2014 -0500
@@ -305,7 +305,7 @@
    update, up, checkout, co
                  update working directory (or switch revisions)
   
-  global options:
+  global options ([+] can be repeated):
   
    -R --repository REPO   repository root directory or name of overlay bundle
                           file
@@ -326,8 +326,6 @@
    -h --help              display help and exit
       --hidden            consider hidden changesets
   
-  [+] marked option can be specified multiple times
-  
   use "hg help" for the full list of commands
 
   $ hg add -h
@@ -344,15 +342,13 @@
   
       Returns 0 if all files are successfully added.
   
-  options:
+  options ([+] can be repeated):
   
    -I --include PATTERN [+] include names matching the given patterns
    -X --exclude PATTERN [+] exclude names matching the given patterns
    -S --subrepos            recurse into subrepositories
    -n --dry-run             do not perform actions, just print output
   
-  [+] marked option can be specified multiple times
-  
   (some details hidden, use --verbose to show complete help)
 
 Verbose help for add
@@ -383,16 +379,14 @@
   
       Returns 0 if all files are successfully added.
   
-  options:
+  options ([+] can be repeated):
   
    -I --include PATTERN [+] include names matching the given patterns
    -X --exclude PATTERN [+] exclude names matching the given patterns
    -S --subrepos            recurse into subrepositories
    -n --dry-run             do not perform actions, just print output
   
-  [+] marked option can be specified multiple times
-  
-  global options:
+  global options ([+] can be repeated):
   
    -R --repository REPO   repository root directory or name of overlay bundle
                           file
@@ -412,8 +406,6 @@
       --version           output version information and exit
    -h --help              display help and exit
       --hidden            consider hidden changesets
-  
-  [+] marked option can be specified multiple times
 
 Test help option with version option
 
@@ -431,15 +423,13 @@
   
   add the specified files on the next commit
   
-  options:
+  options ([+] can be repeated):
   
    -I --include PATTERN [+] include names matching the given patterns
    -X --exclude PATTERN [+] exclude names matching the given patterns
    -S --subrepos            recurse into subrepositories
    -n --dry-run             do not perform actions, just print output
   
-  [+] marked option can be specified multiple times
-  
   (use "hg add -h" to show more help)
   [255]
 
@@ -505,7 +495,7 @@
   
       Returns 0 on success.
   
-  options:
+  options ([+] can be repeated):
   
    -r --rev REV [+]         revision
    -c --change REV          change made by revision
@@ -523,8 +513,6 @@
    -X --exclude PATTERN [+] exclude names matching the given patterns
    -S --subrepos            recurse into subrepositories
   
-  [+] marked option can be specified multiple times
-  
   (some details hidden, use --verbose to show complete help)
 
   $ hg help status
@@ -567,7 +555,7 @@
   
       Returns 0 on success.
   
-  options:
+  options ([+] can be repeated):
   
    -A --all                 show status of all files
    -m --modified            show only modified files
@@ -586,8 +574,6 @@
    -X --exclude PATTERN [+] exclude names matching the given patterns
    -S --subrepos            recurse into subrepositories
   
-  [+] marked option can be specified multiple times
-  
   (some details hidden, use --verbose to show complete help)
 
   $ hg -q help status
@@ -1715,7 +1701,7 @@
   Returns 0 if all files are successfully added.
   </p>
   <p>
-  options:
+  options ([+] can be repeated):
   </p>
   <table>
   <tr><td>-I</td>
@@ -1732,10 +1718,7 @@
   <td>do not perform actions, just print output</td></tr>
   </table>
   <p>
-  [+] marked option can be specified multiple times
-  </p>
-  <p>
-  global options:
+  global options ([+] can be repeated):
   </p>
   <table>
   <tr><td>-R</td>
@@ -1787,9 +1770,6 @@
   <td>--hidden</td>
   <td>consider hidden changesets</td></tr>
   </table>
-  <p>
-  [+] marked option can be specified multiple times
-  </p>
   
   </div>
   </div>
@@ -1911,7 +1891,7 @@
   Returns 0 on success, 1 if any warnings encountered.
   </p>
   <p>
-  options:
+  options ([+] can be repeated):
   </p>
   <table>
   <tr><td>-A</td>
@@ -1928,10 +1908,7 @@
   <td>exclude names matching the given patterns</td></tr>
   </table>
   <p>
-  [+] marked option can be specified multiple times
-  </p>
-  <p>
-  global options:
+  global options ([+] can be repeated):
   </p>
   <table>
   <tr><td>-R</td>
@@ -1983,9 +1960,6 @@
   <td>--hidden</td>
   <td>consider hidden changesets</td></tr>
   </table>
-  <p>
-  [+] marked option can be specified multiple times
-  </p>
   
   </div>
   </div>
--- a/tests/test-mq-qrefresh-interactive.t	Tue Aug 12 03:53:33 2014 -0500
+++ b/tests/test-mq-qrefresh-interactive.t	Tue Aug 12 04:00:42 2014 -0500
@@ -29,7 +29,7 @@
   
       Returns 0 on success.
   
-  options:
+  options ([+] can be repeated):
   
    -e --edit                invoke editor on commit messages
    -g --git                 use git extended diff format
@@ -44,8 +44,6 @@
    -m --message TEXT        use text as commit message
    -l --logfile FILE        read commit message from file
   
-  [+] marked option can be specified multiple times
-  
   (some details hidden, use --verbose to show complete help)
 
 help qrefresh (record)
@@ -73,7 +71,7 @@
   
       Returns 0 on success.
   
-  options:
+  options ([+] can be repeated):
   
    -e --edit                invoke editor on commit messages
    -g --git                 use git extended diff format
@@ -89,8 +87,6 @@
    -l --logfile FILE        read commit message from file
    -i --interactive         interactively select changes to refresh
   
-  [+] marked option can be specified multiple times
-  
   (some details hidden, use --verbose to show complete help)
 
   $ hg init a
--- a/tests/test-qrecord.t	Tue Aug 12 03:53:33 2014 -0500
+++ b/tests/test-qrecord.t	Tue Aug 12 04:00:42 2014 -0500
@@ -54,7 +54,7 @@
   
       This command is not available when committing a merge.
   
-  options:
+  options ([+] can be repeated):
   
    -A --addremove           mark new/missing files as added/removed before
                             committing
@@ -74,8 +74,6 @@
    -b --ignore-space-change ignore changes in the amount of white space
    -B --ignore-blank-lines  ignore changes whose lines are all blank
   
-  [+] marked option can be specified multiple times
-  
   (some details hidden, use --verbose to show complete help)
 
 help (no mq, so no qrecord)
@@ -133,7 +131,7 @@
   
       See "hg help qnew" & "hg help record" for more information and usage.
   
-  options:
+  options ([+] can be repeated):
   
    -e --edit                invoke editor on commit messages
    -g --git                 use git extended diff format
@@ -150,8 +148,6 @@
    -B --ignore-blank-lines  ignore changes whose lines are all blank
       --mq                  operate on patch repository
   
-  [+] marked option can be specified multiple times
-  
   (some details hidden, use --verbose to show complete help)
 
   $ cd a
--- a/tests/test-strip.t	Tue Aug 12 03:53:33 2014 -0500
+++ b/tests/test-strip.t	Tue Aug 12 04:00:42 2014 -0500
@@ -534,7 +534,7 @@
   
   (use "hg help -e strip" to show help for the strip extension)
   
-  options:
+  options ([+] can be repeated):
   
    -r --rev REV [+]    strip specified revision (optional, can specify revisions
                        without this option)
@@ -545,7 +545,5 @@
    -B --bookmark VALUE remove revs only reachable from given bookmark
       --mq             operate on patch repository
   
-  [+] marked option can be specified multiple times
-  
   (use "hg strip -h" to show more help)
   [255]