Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/help.py (6 lines) | |||
M | tests/test-extension.t (12 lines) | |||
M | tests/test-fix.t (6 lines) | |||
M | tests/test-help.t (10 lines) | |||
M | tests/test-narrow-trackedcmd.t (3 lines) | |||
M | tests/test-shelve.t (2 lines) | |||
M | tests/test-uncommit.t (3 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz |
so = '' | so = '' | ||||
if shortopt: | if shortopt: | ||||
so = '-' + shortopt | so = '-' + shortopt | ||||
lo = '--' + longopt | lo = '--' + longopt | ||||
if isinstance(default, fancyopts.customopt): | if isinstance(default, fancyopts.customopt): | ||||
default = default.getdefaultvalue() | default = default.getdefaultvalue() | ||||
if default and not callable(default): | if (default and not callable(default)) or default is False: | ||||
# default is of unknown type, and in Python 2 we abused | # default is of unknown type, and in Python 2 we abused | ||||
# the %s-shows-repr property to handle integers etc. To | # the %s-shows-repr property to handle integers etc. To | ||||
# match that behavior on Python 3, we do str(default) and | # match that behavior on Python 3, we do str(default) and | ||||
# then convert it to bytes. | # then convert it to bytes. | ||||
defaultstr = pycompat.bytestr(default) | defaultstr = pycompat.bytestr(default) | ||||
if default is True: | if isinstance(default, bool): | ||||
defaultstr = _("on") | defaultstr = _("on") if default else _("off") | ||||
desc += _(" (default: %s)") % defaultstr | desc += _(" (default: %s)") % defaultstr | ||||
if isinstance(default, list): | if isinstance(default, list): | ||||
lo += " %s [+]" % optlabel | lo += " %s [+]" % optlabel | ||||
multioccur = True | multioccur = True | ||||
elif (default is not None) and not isinstance(default, bool): | elif (default is not None) and not isinstance(default, bool): | ||||
lo += " %s" % optlabel | lo += " %s" % optlabel | ||||
--debugger start debugger | --debugger start debugger | ||||
--encoding ENCODE set the charset encoding (default: ascii) | --encoding ENCODE set the charset encoding (default: ascii) | ||||
--encodingmode MODE set the charset encoding mode (default: strict) | --encodingmode MODE set the charset encoding mode (default: strict) | ||||
--traceback always print a traceback on exception | --traceback always print a traceback on exception | ||||
--time time how long the command takes | --time time how long the command takes | ||||
--profile print command execution profile | --profile print command execution profile | ||||
--version output version information and exit | --version output version information and exit | ||||
-h --help display help and exit | -h --help display help and exit | ||||
--hidden consider hidden changesets | --hidden consider hidden changesets (default: off) | ||||
--pager TYPE when to paginate (boolean, always, auto, or never) | --pager TYPE when to paginate (boolean, always, auto, or never) | ||||
(default: auto) | (default: auto) | ||||
--debugger start debugger | --debugger start debugger | ||||
--encoding ENCODE set the charset encoding (default: ascii) | --encoding ENCODE set the charset encoding (default: ascii) | ||||
--encodingmode MODE set the charset encoding mode (default: strict) | --encodingmode MODE set the charset encoding mode (default: strict) | ||||
--traceback always print a traceback on exception | --traceback always print a traceback on exception | ||||
--time time how long the command takes | --time time how long the command takes | ||||
--profile print command execution profile | --profile print command execution profile | ||||
--version output version information and exit | --version output version information and exit | ||||
-h --help display help and exit | -h --help display help and exit | ||||
--hidden consider hidden changesets | --hidden consider hidden changesets (default: off) | ||||
--pager TYPE when to paginate (boolean, always, auto, or never) | --pager TYPE when to paginate (boolean, always, auto, or never) | ||||
(default: auto) | (default: auto) | ||||
$ echo 'debugextension = !' >> $HGRCPATH | $ echo 'debugextension = !' >> $HGRCPATH | ||||
--debugger start debugger | --debugger start debugger | ||||
--encoding ENCODE set the charset encoding (default: ascii) | --encoding ENCODE set the charset encoding (default: ascii) | ||||
--encodingmode MODE set the charset encoding mode (default: strict) | --encodingmode MODE set the charset encoding mode (default: strict) | ||||
--traceback always print a traceback on exception | --traceback always print a traceback on exception | ||||
--time time how long the command takes | --time time how long the command takes | ||||
--profile print command execution profile | --profile print command execution profile | ||||
--version output version information and exit | --version output version information and exit | ||||
-h --help display help and exit | -h --help display help and exit | ||||
--hidden consider hidden changesets | --hidden consider hidden changesets (default: off) | ||||
--pager TYPE when to paginate (boolean, always, auto, or never) | --pager TYPE when to paginate (boolean, always, auto, or never) | ||||
(default: auto) | (default: auto) | ||||
Make sure that single '-v' option shows help and built-ins only for 'dodo' command | Make sure that single '-v' option shows help and built-ins only for 'dodo' command | ||||
$ hg help -v dodo | $ hg help -v dodo | ||||
hg dodo | hg dodo | ||||
Does nothing | Does nothing | ||||
--debugger start debugger | --debugger start debugger | ||||
--encoding ENCODE set the charset encoding (default: ascii) | --encoding ENCODE set the charset encoding (default: ascii) | ||||
--encodingmode MODE set the charset encoding mode (default: strict) | --encodingmode MODE set the charset encoding mode (default: strict) | ||||
--traceback always print a traceback on exception | --traceback always print a traceback on exception | ||||
--time time how long the command takes | --time time how long the command takes | ||||
--profile print command execution profile | --profile print command execution profile | ||||
--version output version information and exit | --version output version information and exit | ||||
-h --help display help and exit | -h --help display help and exit | ||||
--hidden consider hidden changesets | --hidden consider hidden changesets (default: off) | ||||
--pager TYPE when to paginate (boolean, always, auto, or never) | --pager TYPE when to paginate (boolean, always, auto, or never) | ||||
(default: auto) | (default: auto) | ||||
In case when extension name doesn't match any of its commands, | In case when extension name doesn't match any of its commands, | ||||
help message should ask for '-v' to get list of built-in aliases | help message should ask for '-v' to get list of built-in aliases | ||||
along with extension help | along with extension help | ||||
$ cat > $TESTTMP/d/dudu.py <<EOF | $ cat > $TESTTMP/d/dudu.py <<EOF | ||||
> """ | > """ | ||||
--debugger start debugger | --debugger start debugger | ||||
--encoding ENCODE set the charset encoding (default: ascii) | --encoding ENCODE set the charset encoding (default: ascii) | ||||
--encodingmode MODE set the charset encoding mode (default: strict) | --encodingmode MODE set the charset encoding mode (default: strict) | ||||
--traceback always print a traceback on exception | --traceback always print a traceback on exception | ||||
--time time how long the command takes | --time time how long the command takes | ||||
--profile print command execution profile | --profile print command execution profile | ||||
--version output version information and exit | --version output version information and exit | ||||
-h --help display help and exit | -h --help display help and exit | ||||
--hidden consider hidden changesets | --hidden consider hidden changesets (default: off) | ||||
--pager TYPE when to paginate (boolean, always, auto, or never) | --pager TYPE when to paginate (boolean, always, auto, or never) | ||||
(default: auto) | (default: auto) | ||||
$ hg help -v -e dudu | $ hg help -v -e dudu | ||||
dudu extension - | dudu extension - | ||||
This is an awesome 'dudu' extension. It does something and also writes 'Beep | This is an awesome 'dudu' extension. It does something and also writes 'Beep | ||||
beep' | beep' | ||||
--debugger start debugger | --debugger start debugger | ||||
--encoding ENCODE set the charset encoding (default: ascii) | --encoding ENCODE set the charset encoding (default: ascii) | ||||
--encodingmode MODE set the charset encoding mode (default: strict) | --encodingmode MODE set the charset encoding mode (default: strict) | ||||
--traceback always print a traceback on exception | --traceback always print a traceback on exception | ||||
--time time how long the command takes | --time time how long the command takes | ||||
--profile print command execution profile | --profile print command execution profile | ||||
--version output version information and exit | --version output version information and exit | ||||
-h --help display help and exit | -h --help display help and exit | ||||
--hidden consider hidden changesets | --hidden consider hidden changesets (default: off) | ||||
--pager TYPE when to paginate (boolean, always, auto, or never) | --pager TYPE when to paginate (boolean, always, auto, or never) | ||||
(default: auto) | (default: auto) | ||||
Disabled extension commands: | Disabled extension commands: | ||||
$ ORGHGRCPATH=$HGRCPATH | $ ORGHGRCPATH=$HGRCPATH | ||||
$ HGRCPATH= | $ HGRCPATH= | ||||
$ export HGRCPATH | $ export HGRCPATH |
revisions are not forgotten in later ones. The --base flag can be used to | revisions are not forgotten in later ones. The --base flag can be used to | ||||
override this default behavior, though it is not usually desirable to do | override this default behavior, though it is not usually desirable to do | ||||
so. | so. | ||||
(use 'hg help -e fix' to show help for the fix extension) | (use 'hg help -e fix' to show help for the fix extension) | ||||
options ([+] can be repeated): | options ([+] can be repeated): | ||||
--all fix all non-public non-obsolete revisions | --all fix all non-public non-obsolete revisions (default: off) | ||||
--base REV [+] revisions to diff against (overrides automatic selection, | --base REV [+] revisions to diff against (overrides automatic selection, | ||||
and applies to every revision being fixed) | and applies to every revision being fixed) | ||||
-r --rev REV [+] revisions to fix | -r --rev REV [+] revisions to fix | ||||
-w --working-dir fix the working directory | -w --working-dir fix the working directory (default: off) | ||||
--whole always fix every line of a file | --whole always fix every line of a file (default: off) | ||||
(some details hidden, use --verbose to show complete help) | (some details hidden, use --verbose to show complete help) | ||||
$ hg help -e fix | $ hg help -e fix | ||||
fix extension - rewrite file content in changesets or working copy | fix extension - rewrite file content in changesets or working copy | ||||
(EXPERIMENTAL) | (EXPERIMENTAL) | ||||
Provides a command that runs configured tools on the contents of modified | Provides a command that runs configured tools on the contents of modified |
--debugger start debugger | --debugger start debugger | ||||
--encoding ENCODE set the charset encoding (default: ascii) | --encoding ENCODE set the charset encoding (default: ascii) | ||||
--encodingmode MODE set the charset encoding mode (default: strict) | --encodingmode MODE set the charset encoding mode (default: strict) | ||||
--traceback always print a traceback on exception | --traceback always print a traceback on exception | ||||
--time time how long the command takes | --time time how long the command takes | ||||
--profile print command execution profile | --profile print command execution profile | ||||
--version output version information and exit | --version output version information and exit | ||||
-h --help display help and exit | -h --help display help and exit | ||||
--hidden consider hidden changesets | --hidden consider hidden changesets (default: off) | ||||
--pager TYPE when to paginate (boolean, always, auto, or never) | --pager TYPE when to paginate (boolean, always, auto, or never) | ||||
(default: auto) | (default: auto) | ||||
(use 'hg help' for the full list of commands) | (use 'hg help' for the full list of commands) | ||||
$ hg add -h | $ hg add -h | ||||
hg add [OPTION]... [FILE]... | hg add [OPTION]... [FILE]... | ||||
--debugger start debugger | --debugger start debugger | ||||
--encoding ENCODE set the charset encoding (default: ascii) | --encoding ENCODE set the charset encoding (default: ascii) | ||||
--encodingmode MODE set the charset encoding mode (default: strict) | --encodingmode MODE set the charset encoding mode (default: strict) | ||||
--traceback always print a traceback on exception | --traceback always print a traceback on exception | ||||
--time time how long the command takes | --time time how long the command takes | ||||
--profile print command execution profile | --profile print command execution profile | ||||
--version output version information and exit | --version output version information and exit | ||||
-h --help display help and exit | -h --help display help and exit | ||||
--hidden consider hidden changesets | --hidden consider hidden changesets (default: off) | ||||
--pager TYPE when to paginate (boolean, always, auto, or never) | --pager TYPE when to paginate (boolean, always, auto, or never) | ||||
(default: auto) | (default: auto) | ||||
Test the textwidth config option | Test the textwidth config option | ||||
$ hg root -h --config ui.textwidth=50 | $ hg root -h --config ui.textwidth=50 | ||||
hg root | hg root | ||||
options: | options: | ||||
--longdesc VALUE | --longdesc VALUE | ||||
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | ||||
xxxxxxxxxxxxxxxxxxxxxxx (default: 3) | xxxxxxxxxxxxxxxxxxxxxxx (default: 3) | ||||
-n -- normal desc | -n -- normal desc | ||||
--newline VALUE line1 line2 | --newline VALUE line1 line2 | ||||
--default-off enable X | --default-off enable X (default: off) | ||||
--default-on enable Y (default: on) | --default-on enable Y (default: on) | ||||
--callableopt VALUE adds foo | --callableopt VALUE adds foo | ||||
--customopt VALUE adds bar | --customopt VALUE adds bar | ||||
--customopt-withdefault VALUE adds bar (default: foo) | --customopt-withdefault VALUE adds bar (default: foo) | ||||
(some details hidden, use --verbose to show complete help) | (some details hidden, use --verbose to show complete help) | ||||
Test that default list of commands includes extension commands that have help, | Test that default list of commands includes extension commands that have help, | ||||
<tr><td></td> | <tr><td></td> | ||||
<td>--version</td> | <td>--version</td> | ||||
<td>output version information and exit</td></tr> | <td>output version information and exit</td></tr> | ||||
<tr><td>-h</td> | <tr><td>-h</td> | ||||
<td>--help</td> | <td>--help</td> | ||||
<td>display help and exit</td></tr> | <td>display help and exit</td></tr> | ||||
<tr><td></td> | <tr><td></td> | ||||
<td>--hidden</td> | <td>--hidden</td> | ||||
<td>consider hidden changesets</td></tr> | <td>consider hidden changesets (default: off)</td></tr> | ||||
<tr><td></td> | <tr><td></td> | ||||
<td>--pager TYPE</td> | <td>--pager TYPE</td> | ||||
<td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> | ||||
</table> | </table> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<tr><td></td> | <tr><td></td> | ||||
<td>--version</td> | <td>--version</td> | ||||
<td>output version information and exit</td></tr> | <td>output version information and exit</td></tr> | ||||
<tr><td>-h</td> | <tr><td>-h</td> | ||||
<td>--help</td> | <td>--help</td> | ||||
<td>display help and exit</td></tr> | <td>display help and exit</td></tr> | ||||
<tr><td></td> | <tr><td></td> | ||||
<td>--hidden</td> | <td>--hidden</td> | ||||
<td>consider hidden changesets</td></tr> | <td>consider hidden changesets (default: off)</td></tr> | ||||
<tr><td></td> | <tr><td></td> | ||||
<td>--pager TYPE</td> | <td>--pager TYPE</td> | ||||
<td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> | <td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr> | ||||
</table> | </table> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> |
options ([+] can be repeated): | options ([+] can be repeated): | ||||
--addinclude VALUE [+] new paths to include | --addinclude VALUE [+] new paths to include | ||||
--removeinclude VALUE [+] old paths to no longer include | --removeinclude VALUE [+] old paths to no longer include | ||||
--addexclude VALUE [+] new paths to exclude | --addexclude VALUE [+] new paths to exclude | ||||
--import-rules VALUE import narrowspecs from a file | --import-rules VALUE import narrowspecs from a file | ||||
--removeexclude VALUE [+] old paths to no longer exclude | --removeexclude VALUE [+] old paths to no longer exclude | ||||
--clear whether to replace the existing narrowspec | --clear whether to replace the existing narrowspec | ||||
(default: off) | |||||
--force-delete-local-changes forces deletion of local changes when | --force-delete-local-changes forces deletion of local changes when | ||||
narrowing | narrowing (default: off) | ||||
-e --ssh CMD specify ssh command to use | -e --ssh CMD specify ssh command to use | ||||
--remotecmd CMD specify hg command to run on the remote side | --remotecmd CMD specify hg command to run on the remote side | ||||
--insecure do not verify server certificate (ignoring | --insecure do not verify server certificate (ignoring | ||||
web.cacerts config) | web.cacerts config) | ||||
(use 'hg tracked -h' to show more help) | (use 'hg tracked -h' to show more help) | ||||
[255] | [255] | ||||
$ hg tracked --import-rules doesnotexist | $ hg tracked --import-rules doesnotexist |
options ([+] can be repeated): | options ([+] can be repeated): | ||||
-A --addremove mark new/missing files as added/removed before | -A --addremove mark new/missing files as added/removed before | ||||
shelving | shelving | ||||
-u --unknown store unknown files in the shelve | -u --unknown store unknown files in the shelve | ||||
--cleanup delete all shelved changes | --cleanup delete all shelved changes | ||||
--date DATE shelve with the specified commit date | --date DATE shelve with the specified commit date | ||||
-d --delete delete the named shelved change(s) | -d --delete delete the named shelved change(s) | ||||
-e --edit invoke editor on commit messages | -e --edit invoke editor on commit messages (default: off) | ||||
-l --list list current shelves | -l --list list current shelves | ||||
-m --message TEXT use text as shelve message | -m --message TEXT use text as shelve message | ||||
-n --name NAME use the given name for the shelved commit | -n --name NAME use the given name for the shelved commit | ||||
-p --patch output patches for changes (provide the names of the | -p --patch output patches for changes (provide the names of the | ||||
shelved changes as positional arguments) | shelved changes as positional arguments) | ||||
-i --interactive interactive mode, only works while creating a shelve | -i --interactive interactive mode, only works while creating a shelve | ||||
--stat output diffstat-style summary of changes (provide | --stat output diffstat-style summary of changes (provide | ||||
the names of the shelved changes as positional | the names of the shelved changes as positional |
If no files are specified, the commit will be pruned, unless --keep is | If no files are specified, the commit will be pruned, unless --keep is | ||||
given. | given. | ||||
(use 'hg help -e uncommit' to show help for the uncommit extension) | (use 'hg help -e uncommit' to show help for the uncommit extension) | ||||
options ([+] can be repeated): | options ([+] can be repeated): | ||||
--keep allow an empty commit after uncommiting | --keep allow an empty commit after uncommiting (default: | ||||
off) | |||||
-I --include PATTERN [+] include names matching the given patterns | -I --include PATTERN [+] include names matching the given patterns | ||||
-X --exclude PATTERN [+] exclude names matching the given patterns | -X --exclude PATTERN [+] exclude names matching the given patterns | ||||
(some details hidden, use --verbose to show complete help) | (some details hidden, use --verbose to show complete help) | ||||
Uncommit with no commits should fail | Uncommit with no commits should fail | ||||
$ hg uncommit | $ hg uncommit |