##// END OF EJS Templates
help: displaying extension commands by default...
rdamazio@google.com -
r40451:dce0e0f7 default
parent child Browse files
Show More
@@ -540,15 +540,6 def help_(ui, commands, name, unknowncmd
540 540 func = e[0]
541 541 if select and not select(f):
542 542 continue
543 # Only list built-in commands (defined in commands.py) and aliases
544 # (defined in dispatch.py), but not any other extensions.
545 # We don't want a circular dependency between this file and
546 # dispatch, so reference that by name.
547 # TODO(rdamazio): Just show commands from all extensions.
548 if (not select and name != 'shortlist' and
549 func.__module__ != commands.__name__ and
550 func.__module__ != 'mercurial.dispatch'):
551 continue
552 543 doc = pycompat.getdoc(func)
553 544 if filtercmd(ui, f, func, name, doc):
554 545 continue
@@ -820,6 +820,11 this is a section and erroring out weird
820 820 > def nohelp(ui, *args, **kwargs):
821 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 828 > def uisetup(ui):
824 829 > ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext')
825 830 > ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext')
@@ -904,6 +909,19 Test command with no help text
904 909
905 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 925 $ hg help -k nohelp
908 926 Commands:
909 927
@@ -913,144 +931,15 Test command with no help text
913 931
914 932 nohelp (no help text available)
915 933
916 Test that default list of commands omits extension commands
917
918 #if no-extraextensions
919
920 $ hg help
921 Mercurial Distributed SCM
934 $ hg help helpext
935 helpext extension - no help text available
922 936
923 937 list of commands:
924 938
925 Repository creation:
926
927 clone make a copy of an existing repository
928 init create a new repository in the given directory
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)
939 hashelp Extension command's help
940 nohelp (no help text available)
941
942 (use 'hg help -v helpext' to show built-in aliases and global options)
1054 943
1055 944 #endif
1056 945
@@ -1402,18 +1291,6 sub-topics can be accessed
1402 1291 *empty chunk* at the end of each *delta group* denotes the boundary to the
1403 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 1294 test advanced, deprecated and experimental options are hidden in command help
1418 1295 $ hg help debugoptADV
1419 1296 hg debugoptADV
@@ -2665,6 +2542,13 Dish up an empty repo; serve it cold.
2665 2542 search revision history for a pattern in specified files
2666 2543 </td></tr>
2667 2544 <tr><td>
2545 <a href="/help/hashelp">
2546 hashelp
2547 </a>
2548 </td><td>
2549 Extension command's help
2550 </td></tr>
2551 <tr><td>
2668 2552 <a href="/help/heads">
2669 2553 heads
2670 2554 </a>
General Comments 0
You need to be logged in to leave comments. Login now