##// END OF EJS Templates
help: show "default: off" for boolean flags that default to off...
Martin von Zweigbergk -
r40990:8604f130 default
parent child Browse files
Show More
@@ -163,14 +163,14 b' def optrst(header, options, verbose):'
163
163
164 if isinstance(default, fancyopts.customopt):
164 if isinstance(default, fancyopts.customopt):
165 default = default.getdefaultvalue()
165 default = default.getdefaultvalue()
166 if default and not callable(default):
166 if (default and not callable(default)) or default is False:
167 # default is of unknown type, and in Python 2 we abused
167 # default is of unknown type, and in Python 2 we abused
168 # the %s-shows-repr property to handle integers etc. To
168 # the %s-shows-repr property to handle integers etc. To
169 # match that behavior on Python 3, we do str(default) and
169 # match that behavior on Python 3, we do str(default) and
170 # then convert it to bytes.
170 # then convert it to bytes.
171 defaultstr = pycompat.bytestr(default)
171 defaultstr = pycompat.bytestr(default)
172 if default is True:
172 if isinstance(default, bool):
173 defaultstr = _("on")
173 defaultstr = _("on") if default else _("off")
174 desc += _(" (default: %s)") % defaultstr
174 desc += _(" (default: %s)") % defaultstr
175
175
176 if isinstance(default, list):
176 if isinstance(default, list):
@@ -716,7 +716,7 b' hide outer repo'
716 --profile print command execution profile
716 --profile print command execution profile
717 --version output version information and exit
717 --version output version information and exit
718 -h --help display help and exit
718 -h --help display help and exit
719 --hidden consider hidden changesets
719 --hidden consider hidden changesets (default: off)
720 --pager TYPE when to paginate (boolean, always, auto, or never)
720 --pager TYPE when to paginate (boolean, always, auto, or never)
721 (default: auto)
721 (default: auto)
722
722
@@ -755,7 +755,7 b' hide outer repo'
755 --profile print command execution profile
755 --profile print command execution profile
756 --version output version information and exit
756 --version output version information and exit
757 -h --help display help and exit
757 -h --help display help and exit
758 --hidden consider hidden changesets
758 --hidden consider hidden changesets (default: off)
759 --pager TYPE when to paginate (boolean, always, auto, or never)
759 --pager TYPE when to paginate (boolean, always, auto, or never)
760 (default: auto)
760 (default: auto)
761
761
@@ -1043,7 +1043,7 b' extension help itself'
1043 --profile print command execution profile
1043 --profile print command execution profile
1044 --version output version information and exit
1044 --version output version information and exit
1045 -h --help display help and exit
1045 -h --help display help and exit
1046 --hidden consider hidden changesets
1046 --hidden consider hidden changesets (default: off)
1047 --pager TYPE when to paginate (boolean, always, auto, or never)
1047 --pager TYPE when to paginate (boolean, always, auto, or never)
1048 (default: auto)
1048 (default: auto)
1049
1049
@@ -1080,7 +1080,7 b" Make sure that single '-v' option shows "
1080 --profile print command execution profile
1080 --profile print command execution profile
1081 --version output version information and exit
1081 --version output version information and exit
1082 -h --help display help and exit
1082 -h --help display help and exit
1083 --hidden consider hidden changesets
1083 --hidden consider hidden changesets (default: off)
1084 --pager TYPE when to paginate (boolean, always, auto, or never)
1084 --pager TYPE when to paginate (boolean, always, auto, or never)
1085 (default: auto)
1085 (default: auto)
1086
1086
@@ -1155,7 +1155,7 b" help options '-v' and '-v -e' should be "
1155 --profile print command execution profile
1155 --profile print command execution profile
1156 --version output version information and exit
1156 --version output version information and exit
1157 -h --help display help and exit
1157 -h --help display help and exit
1158 --hidden consider hidden changesets
1158 --hidden consider hidden changesets (default: off)
1159 --pager TYPE when to paginate (boolean, always, auto, or never)
1159 --pager TYPE when to paginate (boolean, always, auto, or never)
1160 (default: auto)
1160 (default: auto)
1161
1161
@@ -1191,7 +1191,7 b" help options '-v' and '-v -e' should be "
1191 --profile print command execution profile
1191 --profile print command execution profile
1192 --version output version information and exit
1192 --version output version information and exit
1193 -h --help display help and exit
1193 -h --help display help and exit
1194 --hidden consider hidden changesets
1194 --hidden consider hidden changesets (default: off)
1195 --pager TYPE when to paginate (boolean, always, auto, or never)
1195 --pager TYPE when to paginate (boolean, always, auto, or never)
1196 (default: auto)
1196 (default: auto)
1197
1197
@@ -104,12 +104,12 b' Help text for fix.'
104
104
105 options ([+] can be repeated):
105 options ([+] can be repeated):
106
106
107 --all fix all non-public non-obsolete revisions
107 --all fix all non-public non-obsolete revisions (default: off)
108 --base REV [+] revisions to diff against (overrides automatic selection,
108 --base REV [+] revisions to diff against (overrides automatic selection,
109 and applies to every revision being fixed)
109 and applies to every revision being fixed)
110 -r --rev REV [+] revisions to fix
110 -r --rev REV [+] revisions to fix
111 -w --working-dir fix the working directory
111 -w --working-dir fix the working directory (default: off)
112 --whole always fix every line of a file
112 --whole always fix every line of a file (default: off)
113
113
114 (some details hidden, use --verbose to show complete help)
114 (some details hidden, use --verbose to show complete help)
115
115
@@ -440,7 +440,7 b' Test short command list with verbose opt'
440 --profile print command execution profile
440 --profile print command execution profile
441 --version output version information and exit
441 --version output version information and exit
442 -h --help display help and exit
442 -h --help display help and exit
443 --hidden consider hidden changesets
443 --hidden consider hidden changesets (default: off)
444 --pager TYPE when to paginate (boolean, always, auto, or never)
444 --pager TYPE when to paginate (boolean, always, auto, or never)
445 (default: auto)
445 (default: auto)
446
446
@@ -540,7 +540,7 b' Verbose help for add'
540 --profile print command execution profile
540 --profile print command execution profile
541 --version output version information and exit
541 --version output version information and exit
542 -h --help display help and exit
542 -h --help display help and exit
543 --hidden consider hidden changesets
543 --hidden consider hidden changesets (default: off)
544 --pager TYPE when to paginate (boolean, always, auto, or never)
544 --pager TYPE when to paginate (boolean, always, auto, or never)
545 (default: auto)
545 (default: auto)
546
546
@@ -905,7 +905,7 b' Test command with no help text'
905 xxxxxxxxxxxxxxxxxxxxxxx (default: 3)
905 xxxxxxxxxxxxxxxxxxxxxxx (default: 3)
906 -n -- normal desc
906 -n -- normal desc
907 --newline VALUE line1 line2
907 --newline VALUE line1 line2
908 --default-off enable X
908 --default-off enable X (default: off)
909 --default-on enable Y (default: on)
909 --default-on enable Y (default: on)
910 --callableopt VALUE adds foo
910 --callableopt VALUE adds foo
911 --customopt VALUE adds bar
911 --customopt VALUE adds bar
@@ -2890,7 +2890,7 b' Dish up an empty repo; serve it cold.'
2890 <td>display help and exit</td></tr>
2890 <td>display help and exit</td></tr>
2891 <tr><td></td>
2891 <tr><td></td>
2892 <td>--hidden</td>
2892 <td>--hidden</td>
2893 <td>consider hidden changesets</td></tr>
2893 <td>consider hidden changesets (default: off)</td></tr>
2894 <tr><td></td>
2894 <tr><td></td>
2895 <td>--pager TYPE</td>
2895 <td>--pager TYPE</td>
2896 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
2896 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
@@ -3094,7 +3094,7 b' Dish up an empty repo; serve it cold.'
3094 <td>display help and exit</td></tr>
3094 <td>display help and exit</td></tr>
3095 <tr><td></td>
3095 <tr><td></td>
3096 <td>--hidden</td>
3096 <td>--hidden</td>
3097 <td>consider hidden changesets</td></tr>
3097 <td>consider hidden changesets (default: off)</td></tr>
3098 <tr><td></td>
3098 <tr><td></td>
3099 <td>--pager TYPE</td>
3099 <td>--pager TYPE</td>
3100 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
3100 <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
@@ -105,8 +105,9 b' Testing the --import-rules flag of `hg t'
105 --import-rules VALUE import narrowspecs from a file
105 --import-rules VALUE import narrowspecs from a file
106 --removeexclude VALUE [+] old paths to no longer exclude
106 --removeexclude VALUE [+] old paths to no longer exclude
107 --clear whether to replace the existing narrowspec
107 --clear whether to replace the existing narrowspec
108 (default: off)
108 --force-delete-local-changes forces deletion of local changes when
109 --force-delete-local-changes forces deletion of local changes when
109 narrowing
110 narrowing (default: off)
110 -e --ssh CMD specify ssh command to use
111 -e --ssh CMD specify ssh command to use
111 --remotecmd CMD specify hg command to run on the remote side
112 --remotecmd CMD specify hg command to run on the remote side
112 --insecure do not verify server certificate (ignoring
113 --insecure do not verify server certificate (ignoring
@@ -75,7 +75,7 b' shelve has a help message'
75 --cleanup delete all shelved changes
75 --cleanup delete all shelved changes
76 --date DATE shelve with the specified commit date
76 --date DATE shelve with the specified commit date
77 -d --delete delete the named shelved change(s)
77 -d --delete delete the named shelved change(s)
78 -e --edit invoke editor on commit messages
78 -e --edit invoke editor on commit messages (default: off)
79 -l --list list current shelves
79 -l --list list current shelves
80 -m --message TEXT use text as shelve message
80 -m --message TEXT use text as shelve message
81 -n --name NAME use the given name for the shelved commit
81 -n --name NAME use the given name for the shelved commit
@@ -34,7 +34,8 b' Help for uncommit'
34
34
35 options ([+] can be repeated):
35 options ([+] can be repeated):
36
36
37 --keep allow an empty commit after uncommiting
37 --keep allow an empty commit after uncommiting (default:
38 off)
38 -I --include PATTERN [+] include names matching the given patterns
39 -I --include PATTERN [+] include names matching the given patterns
39 -X --exclude PATTERN [+] exclude names matching the given patterns
40 -X --exclude PATTERN [+] exclude names matching the given patterns
40
41
General Comments 0
You need to be logged in to leave comments. Login now