diff tests/test-help.t @ 30152:d65e246100ed

help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now The ability to negate any boolean flags itself is great, but I think we are not ready to expose the help side of it yet. First, while there exist a handful of such flags whose default value can be changed (eg: git diff, patchwork confirmation), there is only a few of them. The users who benefit the most from this change are alias users and large installation that can deploy extension to change behavior (eg: facebook tweakdefault). So the majority of user who will be affected by a large change to command help that is not yet relevant to them. (I expect this to become relevant when ui.progressive start to exists). Below is an example of the impact of the new help on 'hg help diff': -r --rev REV [+] revision -c --change REV change made by revision -a --[no-]text treat all files as text -g --[no-]git use git extended diff format --[no-]nodates omit dates from diff headers --[no-]noprefix omit a/ and b/ prefixes from filenames -p --[no-]show-function show which function each change is in --[no-]reverse produce a diff that undoes the changes -w --[no-]ignore-all-space ignore white space when comparing lines -b --[no-]ignore-space-change ignore changes in the amount of white space -B --[no-]ignore-blank-lines ignore changes whose lines are all blank -U --unified NUM number of lines of context to show --[no-]stat output diffstat-style summary of changes --root DIR produce diffs relative to subdirectory -I --include PATTERN [+] include names matching the given patterns -X --exclude PATTERN [+] exclude names matching the given patterns -S --[no-]subrepos recurse into subrepositories Another issue with the current state of help, the default value for the flag is not conveyed to the user. For example in the 'backout' help, there is no real distinction between "--[no-]backup" (default to True) and "--[no-]keep" (default) to False: --[no-]backup no backups --[no-]keep do not modify working directory during strip In addition, I've discussed with Augie Fackler and the last batch of the work on this have burned him out quite some. Therefore he is not intending to perform any more work on this topic. Quoting him, he would rather see the help part backed out than spending more time on it. I do not think we are ready to expose this to users in 4.0 (freeze in a week), especially because we cannot expect quick improvement on these aspect as this topic no longer have an owner. We should be able to reintroduce that change in the future when someone get back on it and the main issues are solves: * Introduction of ui.progressive makes it relevant for a majority of user, * Current default value are efficiently conveyed to the user. (In addition, the excerpt from diff help show that we still have some issue with some negative option like '--nodates' so further improvement are probably welcome there.)
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Sun, 09 Oct 2016 03:11:18 +0200
parents cd7276f7ea83
children ff7df4bb75de
line wrap: on
line diff
--- a/tests/test-help.t	Mon Sep 19 17:15:39 2016 -0400
+++ b/tests/test-help.t	Sun Oct 09 03:11:18 2016 +0200
@@ -318,19 +318,19 @@
       --cwd DIR           change working directory
    -y --noninteractive    do not prompt, automatically pick the first choice for
                           all prompts
-   -q --[no-]quiet        suppress output
-   -v --[no-]verbose      enable additional output
+   -q --quiet             suppress output
+   -v --verbose           enable additional output
       --config CONFIG [+] set/override config option (use 'section.name=value')
-      --[no-]debug        enable debugging output
-      --[no-]debugger     start debugger
+      --debug             enable debugging output
+      --debugger          start debugger
       --encoding ENCODE   set the charset encoding (default: ascii)
       --encodingmode MODE set the charset encoding mode (default: strict)
-      --[no-]traceback    always print a traceback on exception
-      --[no-]time         time how long the command takes
-      --[no-]profile      print command execution profile
+      --traceback         always print a traceback on exception
+      --time              time how long the command takes
+      --profile           print command execution profile
       --version           output version information and exit
    -h --help              display help and exit
-      --[no-]hidden       consider hidden changesets
+      --hidden            consider hidden changesets
   
   (use 'hg help' for the full list of commands)
 
@@ -353,8 +353,8 @@
   
    -I --include PATTERN [+] include names matching the given patterns
    -X --exclude PATTERN [+] exclude names matching the given patterns
-   -S --[no-]subrepos       recurse into subrepositories
-   -n --[no-]dry-run        do not perform actions, just print output
+   -S --subrepos            recurse into subrepositories
+   -n --dry-run             do not perform actions, just print output
   
   (some details hidden, use --verbose to show complete help)
 
@@ -404,8 +404,8 @@
   
    -I --include PATTERN [+] include names matching the given patterns
    -X --exclude PATTERN [+] exclude names matching the given patterns
-   -S --[no-]subrepos       recurse into subrepositories
-   -n --[no-]dry-run        do not perform actions, just print output
+   -S --subrepos            recurse into subrepositories
+   -n --dry-run             do not perform actions, just print output
   
   global options ([+] can be repeated):
   
@@ -414,19 +414,19 @@
       --cwd DIR           change working directory
    -y --noninteractive    do not prompt, automatically pick the first choice for
                           all prompts
-   -q --[no-]quiet        suppress output
-   -v --[no-]verbose      enable additional output
+   -q --quiet             suppress output
+   -v --verbose           enable additional output
       --config CONFIG [+] set/override config option (use 'section.name=value')
-      --[no-]debug        enable debugging output
-      --[no-]debugger     start debugger
+      --debug             enable debugging output
+      --debugger          start debugger
       --encoding ENCODE   set the charset encoding (default: ascii)
       --encodingmode MODE set the charset encoding mode (default: strict)
-      --[no-]traceback    always print a traceback on exception
-      --[no-]time         time how long the command takes
-      --[no-]profile      print command execution profile
+      --traceback         always print a traceback on exception
+      --time              time how long the command takes
+      --profile           print command execution profile
       --version           output version information and exit
    -h --help              display help and exit
-      --[no-]hidden       consider hidden changesets
+      --hidden            consider hidden changesets
 
 Test the textwidth config option
 
@@ -464,8 +464,8 @@
   
    -I --include PATTERN [+] include names matching the given patterns
    -X --exclude PATTERN [+] exclude names matching the given patterns
-   -S --[no-]subrepos       recurse into subrepositories
-   -n --[no-]dry-run        do not perform actions, just print output
+   -S --subrepos            recurse into subrepositories
+   -n --dry-run             do not perform actions, just print output
   
   (use 'hg add -h' to show more help)
   [255]
@@ -534,23 +534,23 @@
   
   options ([+] can be repeated):
   
-   -r --rev REV [+]              revision
-   -c --change REV               change made by revision
-   -a --[no-]text                treat all files as text
-   -g --[no-]git                 use git extended diff format
-      --[no-]nodates             omit dates from diff headers
-      --[no-]noprefix            omit a/ and b/ prefixes from filenames
-   -p --[no-]show-function       show which function each change is in
-      --[no-]reverse             produce a diff that undoes the changes
-   -w --[no-]ignore-all-space    ignore white space when comparing lines
-   -b --[no-]ignore-space-change ignore changes in the amount of white space
-   -B --[no-]ignore-blank-lines  ignore changes whose lines are all blank
-   -U --unified NUM              number of lines of context to show
-      --[no-]stat                output diffstat-style summary of changes
-      --root DIR                 produce diffs relative to subdirectory
-   -I --include PATTERN [+]      include names matching the given patterns
-   -X --exclude PATTERN [+]      exclude names matching the given patterns
-   -S --[no-]subrepos            recurse into subrepositories
+   -r --rev REV [+]         revision
+   -c --change REV          change made by revision
+   -a --text                treat all files as text
+   -g --git                 use git extended diff format
+      --nodates             omit dates from diff headers
+      --noprefix            omit a/ and b/ prefixes from filenames
+   -p --show-function       show which function each change is in
+      --reverse             produce a diff that undoes the changes
+   -w --ignore-all-space    ignore white space when comparing lines
+   -b --ignore-space-change ignore changes in the amount of white space
+   -B --ignore-blank-lines  ignore changes whose lines are all blank
+   -U --unified NUM         number of lines of context to show
+      --stat                output diffstat-style summary of changes
+      --root DIR            produce diffs relative to subdirectory
+   -I --include PATTERN [+] include names matching the given patterns
+   -X --exclude PATTERN [+] exclude names matching the given patterns
+   -S --subrepos            recurse into subrepositories
   
   (some details hidden, use --verbose to show complete help)
 
@@ -596,22 +596,22 @@
   
   options ([+] can be repeated):
   
-   -A --[no-]all            show status of all files
-   -m --[no-]modified       show only modified files
-   -a --[no-]added          show only added files
-   -r --[no-]removed        show only removed files
-   -d --[no-]deleted        show only deleted (but tracked) files
-   -c --[no-]clean          show only files without changes
-   -u --[no-]unknown        show only unknown (not tracked) files
-   -i --[no-]ignored        show only ignored files
-   -n --[no-]status         hide status prefix
-   -C --[no-]copies         show source of copied files
-   -0 --[no-]print0         end filenames with NUL, for use with xargs
+   -A --all                 show status of all files
+   -m --modified            show only modified files
+   -a --added               show only added files
+   -r --removed             show only removed files
+   -d --deleted             show only deleted (but tracked) files
+   -c --clean               show only files without changes
+   -u --unknown             show only unknown (not tracked) files
+   -i --ignored             show only ignored files
+   -n --no-status           hide status prefix
+   -C --copies              show source of copied files
+   -0 --print0              end filenames with NUL, for use with xargs
       --rev REV [+]         show difference from revision
       --change REV          list the changed files of a revision
    -I --include PATTERN [+] include names matching the given patterns
    -X --exclude PATTERN [+] exclude names matching the given patterns
-   -S --[no-]subrepos       recurse into subrepositories
+   -S --subrepos            recurse into subrepositories
   
   (some details hidden, use --verbose to show complete help)
 
@@ -717,7 +717,7 @@
   
   options:
   
-    --[no-]remote check for push and pull
+    --remote check for push and pull
   
   (some details hidden, use --verbose to show complete help)
 
@@ -743,7 +743,7 @@
   
       --longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
-   -n --[no-]          normal desc
+   -n --               normal desc
       --newline VALUE  line1 line2
   
   (some details hidden, use --verbose to show complete help)
@@ -1128,9 +1128,9 @@
 
 test deprecated and experimental options is shown with -v
   $ hg help -v debugoptDEP | grep dopt
-    --[no-]dopt option is (DEPRECATED)
+    --dopt option is (DEPRECATED)
   $ hg help -v debugoptEXP | grep eopt
-    --[no-]eopt option is (EXPERIMENTAL)
+    --eopt option is (EXPERIMENTAL)
 
 #if gettext
 test deprecated option is hidden with translation with untranslated description
@@ -2474,10 +2474,10 @@
   <td>--exclude PATTERN [+]</td>
   <td>exclude names matching the given patterns</td></tr>
   <tr><td>-S</td>
-  <td>--[no-]subrepos</td>
+  <td>--subrepos</td>
   <td>recurse into subrepositories</td></tr>
   <tr><td>-n</td>
-  <td>--[no-]dry-run</td>
+  <td>--dry-run</td>
   <td>do not perform actions, just print output</td></tr>
   </table>
   <p>
@@ -2494,19 +2494,19 @@
   <td>--noninteractive</td>
   <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
   <tr><td>-q</td>
-  <td>--[no-]quiet</td>
+  <td>--quiet</td>
   <td>suppress output</td></tr>
   <tr><td>-v</td>
-  <td>--[no-]verbose</td>
+  <td>--verbose</td>
   <td>enable additional output</td></tr>
   <tr><td></td>
   <td>--config CONFIG [+]</td>
   <td>set/override config option (use 'section.name=value')</td></tr>
   <tr><td></td>
-  <td>--[no-]debug</td>
+  <td>--debug</td>
   <td>enable debugging output</td></tr>
   <tr><td></td>
-  <td>--[no-]debugger</td>
+  <td>--debugger</td>
   <td>start debugger</td></tr>
   <tr><td></td>
   <td>--encoding ENCODE</td>
@@ -2515,13 +2515,13 @@
   <td>--encodingmode MODE</td>
   <td>set the charset encoding mode (default: strict)</td></tr>
   <tr><td></td>
-  <td>--[no-]traceback</td>
+  <td>--traceback</td>
   <td>always print a traceback on exception</td></tr>
   <tr><td></td>
-  <td>--[no-]time</td>
+  <td>--time</td>
   <td>time how long the command takes</td></tr>
   <tr><td></td>
-  <td>--[no-]profile</td>
+  <td>--profile</td>
   <td>print command execution profile</td></tr>
   <tr><td></td>
   <td>--version</td>
@@ -2530,7 +2530,7 @@
   <td>--help</td>
   <td>display help and exit</td></tr>
   <tr><td></td>
-  <td>--[no-]hidden</td>
+  <td>--hidden</td>
   <td>consider hidden changesets</td></tr>
   </table>
   
@@ -2661,13 +2661,13 @@
   </p>
   <table>
   <tr><td>-A</td>
-  <td>--[no-]after</td>
+  <td>--after</td>
   <td>record delete for missing files</td></tr>
   <tr><td>-f</td>
-  <td>--[no-]force</td>
+  <td>--force</td>
   <td>forget added files, delete modified files</td></tr>
   <tr><td>-S</td>
-  <td>--[no-]subrepos</td>
+  <td>--subrepos</td>
   <td>recurse into subrepositories</td></tr>
   <tr><td>-I</td>
   <td>--include PATTERN [+]</td>
@@ -2690,19 +2690,19 @@
   <td>--noninteractive</td>
   <td>do not prompt, automatically pick the first choice for all prompts</td></tr>
   <tr><td>-q</td>
-  <td>--[no-]quiet</td>
+  <td>--quiet</td>
   <td>suppress output</td></tr>
   <tr><td>-v</td>
-  <td>--[no-]verbose</td>
+  <td>--verbose</td>
   <td>enable additional output</td></tr>
   <tr><td></td>
   <td>--config CONFIG [+]</td>
   <td>set/override config option (use 'section.name=value')</td></tr>
   <tr><td></td>
-  <td>--[no-]debug</td>
+  <td>--debug</td>
   <td>enable debugging output</td></tr>
   <tr><td></td>
-  <td>--[no-]debugger</td>
+  <td>--debugger</td>
   <td>start debugger</td></tr>
   <tr><td></td>
   <td>--encoding ENCODE</td>
@@ -2711,13 +2711,13 @@
   <td>--encodingmode MODE</td>
   <td>set the charset encoding mode (default: strict)</td></tr>
   <tr><td></td>
-  <td>--[no-]traceback</td>
+  <td>--traceback</td>
   <td>always print a traceback on exception</td></tr>
   <tr><td></td>
-  <td>--[no-]time</td>
+  <td>--time</td>
   <td>time how long the command takes</td></tr>
   <tr><td></td>
-  <td>--[no-]profile</td>
+  <td>--profile</td>
   <td>print command execution profile</td></tr>
   <tr><td></td>
   <td>--version</td>
@@ -2726,7 +2726,7 @@
   <td>--help</td>
   <td>display help and exit</td></tr>
   <tr><td></td>
-  <td>--[no-]hidden</td>
+  <td>--hidden</td>
   <td>consider hidden changesets</td></tr>
   </table>