comparison tests/test-help.t @ 40415:dce0e0f78f0f

help: displaying extension commands by default Differential Revision: https://phab.mercurial-scm.org/D5156
author rdamazio@google.com
date Thu, 18 Oct 2018 19:57:30 -0700
parents 444861dc1e55
children 419d703115b0
comparison
equal deleted inserted replaced
40414:444861dc1e55 40415:dce0e0f78f0f
818 > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')]) 818 > @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')])
819 > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')]) 819 > @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')])
820 > def nohelp(ui, *args, **kwargs): 820 > def nohelp(ui, *args, **kwargs):
821 > pass 821 > pass
822 > 822 >
823 > @command(b'hashelp', [], b'hg hashelp', norepo=True)
824 > def hashelp(ui, *args, **kwargs):
825 > """Extension command's help"""
826 > pass
827 >
823 > def uisetup(ui): 828 > def uisetup(ui):
824 > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext') 829 > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext')
825 > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext') 830 > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext')
826 > ui.setconfig(b'alias', b'hgalias:doc', b'My doc', b'helpext') 831 > ui.setconfig(b'alias', b'hgalias:doc', b'My doc', b'helpext')
827 > ui.setconfig(b'alias', b'hgalias:category', b'navigation', b'helpext') 832 > ui.setconfig(b'alias', b'hgalias:category', b'navigation', b'helpext')
902 --customopt VALUE adds bar 907 --customopt VALUE adds bar
903 --customopt-withdefault VALUE adds bar (default: foo) 908 --customopt-withdefault VALUE adds bar (default: foo)
904 909
905 (some details hidden, use --verbose to show complete help) 910 (some details hidden, use --verbose to show complete help)
906 911
912 Test that default list of commands includes extension commands that have help,
913 but not those that don't, except in verbose mode, when a keyword is passed, or
914 when help about the extension is requested.
915
916 #if no-extraextensions
917
918 $ hg help | grep hashelp
919 hashelp Extension command's help
920 $ hg help | grep nohelp
921 [1]
922 $ hg help -v | grep nohelp
923 nohelp (no help text available)
924
907 $ hg help -k nohelp 925 $ hg help -k nohelp
908 Commands: 926 Commands:
909 927
910 nohelp hg nohelp 928 nohelp hg nohelp
911 929
912 Extension Commands: 930 Extension Commands:
913 931
914 nohelp (no help text available) 932 nohelp (no help text available)
915 933
916 Test that default list of commands omits extension commands 934 $ hg help helpext
917 935 helpext extension - no help text available
918 #if no-extraextensions
919
920 $ hg help
921 Mercurial Distributed SCM
922 936
923 list of commands: 937 list of commands:
924 938
925 Repository creation: 939 hashelp Extension command's help
926 940 nohelp (no help text available)
927 clone make a copy of an existing repository 941
928 init create a new repository in the given directory 942 (use 'hg help -v helpext' to show built-in aliases and global options)
929
930 Remote repository management:
931
932 incoming show new changesets found in source
933 outgoing show changesets not found in the destination
934 paths show aliases for remote repositories
935 pull pull changes from the specified source
936 push push changes to the specified destination
937 serve start stand-alone webserver
938
939 Change creation:
940
941 commit commit the specified files or all outstanding changes
942
943 Change manipulation:
944
945 backout reverse effect of earlier changeset
946 graft copy changes from other branches onto the current branch
947 merge merge another revision into working directory
948
949 Change organization:
950
951 bookmarks create a new bookmark or list existing bookmarks
952 branch set or show the current branch name
953 branches list repository named branches
954 phase set or show the current phase name
955 tag add one or more tags for the current or given revision
956 tags list repository tags
957
958 File content management:
959
960 annotate show changeset information by line for each file
961 cat output the current or given revision of files
962 copy mark files as copied for the next commit
963 diff diff repository (or selected files)
964 grep search revision history for a pattern in specified files
965
966 Change navigation:
967
968 bisect subdivision search of changesets
969 heads show branch heads
970 hgalias My doc
971 identify identify the working directory or specified revision
972 log show revision history of entire repository or files
973
974 Working directory management:
975
976 add add the specified files on the next commit
977 addremove add all new files, delete all missing files
978 files list tracked files
979 forget forget the specified files on the next commit
980 remove remove the specified files on the next commit
981 rename rename files; equivalent of copy + remove
982 resolve redo merges or set/view the merge status of files
983 revert restore files to their checkout state
984 root print the root (top) of the current working directory
985 status show changed files in the working directory
986 summary summarize working directory state
987 update update working directory (or switch revisions)
988
989 Change import/export:
990
991 archive create an unversioned archive of a repository revision
992 bundle create a bundle file
993 export dump the header and diffs for one or more changesets
994 import import an ordered set of patches
995 unbundle apply one or more bundle files
996
997 Repository maintenance:
998
999 manifest output the current or given revision of the project manifest
1000 recover roll back an interrupted transaction
1001 verify verify the integrity of the repository
1002
1003 Help:
1004
1005 config show combined config settings from all hgrc files
1006 help show help for a given topic or a help overview
1007 version output version and copyright information
1008
1009 enabled extensions:
1010
1011 helpext (no help text available)
1012
1013 additional help topics:
1014
1015 Mercurial identifiers:
1016
1017 filesets Specifying File Sets
1018 hgignore Syntax for Mercurial Ignore Files
1019 patterns File Name Patterns
1020 revisions Specifying Revisions
1021 urls URL Paths
1022
1023 Mercurial output:
1024
1025 color Colorizing Outputs
1026 dates Date Formats
1027 diffs Diff Formats
1028 templating Template Usage
1029
1030 Mercurial configuration:
1031
1032 config Configuration Files
1033 environment Environment Variables
1034 extensions Using Additional Features
1035 flags Command-line flags
1036 hgweb Configuring hgweb
1037 merge-tools Merge Tools
1038 pager Pager Support
1039
1040 Concepts:
1041
1042 bundlespec Bundle File Formats
1043 glossary Glossary
1044 phases Working with Phases
1045 subrepos Subrepositories
1046
1047 Miscellaneous:
1048
1049 deprecated Deprecated Features
1050 internals Technical implementation topics
1051 scripting Using Mercurial from scripts and automation
1052
1053 (use 'hg help -v' to show built-in aliases and global options)
1054 943
1055 #endif 944 #endif
1056 945
1057 Test list of internal help commands 946 Test list of internal help commands
1058 947
1400 That is, a *chunk* consisting of the filename (not terminated or padded) 1289 That is, a *chunk* consisting of the filename (not terminated or padded)
1401 followed by N chunks constituting the *delta group* for this file. The 1290 followed by N chunks constituting the *delta group* for this file. The
1402 *empty chunk* at the end of each *delta group* denotes the boundary to the 1291 *empty chunk* at the end of each *delta group* denotes the boundary to the
1403 next filelog sub-segment. 1292 next filelog sub-segment.
1404 1293
1405 Test list of commands with command with no help text
1406
1407 $ hg help helpext
1408 helpext extension - no help text available
1409
1410 list of commands:
1411
1412 nohelp (no help text available)
1413
1414 (use 'hg help -v helpext' to show built-in aliases and global options)
1415
1416
1417 test advanced, deprecated and experimental options are hidden in command help 1294 test advanced, deprecated and experimental options are hidden in command help
1418 $ hg help debugoptADV 1295 $ hg help debugoptADV
1419 hg debugoptADV 1296 hg debugoptADV
1420 1297
1421 (no help text available) 1298 (no help text available)
2661 <a href="/help/grep"> 2538 <a href="/help/grep">
2662 grep 2539 grep
2663 </a> 2540 </a>
2664 </td><td> 2541 </td><td>
2665 search revision history for a pattern in specified files 2542 search revision history for a pattern in specified files
2543 </td></tr>
2544 <tr><td>
2545 <a href="/help/hashelp">
2546 hashelp
2547 </a>
2548 </td><td>
2549 Extension command's help
2666 </td></tr> 2550 </td></tr>
2667 <tr><td> 2551 <tr><td>
2668 <a href="/help/heads"> 2552 <a href="/help/heads">
2669 heads 2553 heads
2670 </a> 2554 </a>