##// END OF EJS Templates
Shorten help...
mpm@selenic.com -
r593:ca3c499e default
parent child Browse files
Show More
@@ -215,16 +215,22 b' def help(ui, cmd=None):'
215 ui.warn("hg: unknown command %s\n" % cmd)
215 ui.warn("hg: unknown command %s\n" % cmd)
216 sys.exit(0)
216 sys.exit(0)
217 else:
217 else:
218 if not ui.quiet:
218 if ui.verbose:
219 show_version(ui)
219 show_version(ui)
220 ui.write('\n')
220 ui.write('\n')
221 ui.write('hg commands:\n\n')
221 if ui.verbose:
222 ui.write('hg commands:\n\n')
223 else:
224 ui.write('basic hg commands (use -v for long list):\n\n')
222
225
223 h = {}
226 h = {}
224 for c, e in table.items():
227 for c, e in table.items():
225 f = c.split("|")[0]
228 f = c.split("|")[0]
226 if f.startswith("debug"):
229 if not ui.verbose and not f.startswith("^"):
227 continue
230 continue
231 if not ui.debugflag and f.startswith("debug"):
232 continue
233 f = f.lstrip("^")
228 d = ""
234 d = ""
229 if e[0].__doc__:
235 if e[0].__doc__:
230 d = e[0].__doc__.splitlines(0)[0].rstrip()
236 d = e[0].__doc__.splitlines(0)[0].rstrip()
@@ -878,7 +884,7 b' def verify(ui, repo):'
878 # Command options and aliases are listed here, alphabetically
884 # Command options and aliases are listed here, alphabetically
879
885
880 table = {
886 table = {
881 "add": (add, [], "hg add [files]"),
887 "^add": (add, [], "hg add [files]"),
882 "addremove": (addremove, [], "hg addremove [files]"),
888 "addremove": (addremove, [], "hg addremove [files]"),
883 "annotate": (annotate,
889 "annotate": (annotate,
884 [('r', 'revision', '', 'revision'),
890 [('r', 'revision', '', 'revision'),
@@ -887,9 +893,9 b' table = {'
887 ('c', 'changeset', None, 'show changeset')],
893 ('c', 'changeset', None, 'show changeset')],
888 'hg annotate [-u] [-c] [-n] [-r id] [files]'),
894 'hg annotate [-u] [-c] [-n] [-r id] [files]'),
889 "cat": (cat, [], 'hg cat <file> [rev]'),
895 "cat": (cat, [], 'hg cat <file> [rev]'),
890 "clone": (clone, [('U', 'noupdate', None, 'skip update after cloning')],
896 "^clone": (clone, [('U', 'noupdate', None, 'skip update after cloning')],
891 'hg clone [options] <source> [dest]'),
897 'hg clone [options] <source> [dest]'),
892 "commit|ci": (commit,
898 "^commit|ci": (commit,
893 [('t', 'text', "", 'commit text'),
899 [('t', 'text', "", 'commit text'),
894 ('A', 'addremove', None, 'run add/remove during commit'),
900 ('A', 'addremove', None, 'run add/remove during commit'),
895 ('l', 'logfile', "", 'commit text file'),
901 ('l', 'logfile', "", 'commit text file'),
@@ -901,7 +907,7 b' table = {'
901 "debugdumpdirstate": (debugdumpdirstate, [], 'debugdumpdirstate'),
907 "debugdumpdirstate": (debugdumpdirstate, [], 'debugdumpdirstate'),
902 "debugindex": (debugindex, [], 'debugindex <file>'),
908 "debugindex": (debugindex, [], 'debugindex <file>'),
903 "debugindexdot": (debugindexdot, [], 'debugindexdot <file>'),
909 "debugindexdot": (debugindexdot, [], 'debugindexdot <file>'),
904 "diff": (diff, [('r', 'rev', [], 'revision')],
910 "^diff": (diff, [('r', 'rev', [], 'revision')],
905 'hg diff [-r A] [-r B] [files]'),
911 'hg diff [-r A] [-r B] [files]'),
906 "export": (export, [('o', 'output', "", 'output to file')],
912 "export": (export, [('o', 'output', "", 'output to file')],
907 "hg export [-o file] <changeset> ..."),
913 "hg export [-o file] <changeset> ..."),
@@ -913,16 +919,16 b' table = {'
913 [('p', 'strip', 1, 'path strip'),
919 [('p', 'strip', 1, 'path strip'),
914 ('b', 'base', "", 'base path')],
920 ('b', 'base', "", 'base path')],
915 "hg import [options] <patches>"),
921 "hg import [options] <patches>"),
916 "init": (init, [], 'hg init'),
922 "^init": (init, [], 'hg init'),
917 "log|history": (log,
923 "^log|history": (log,
918 [('r', 'rev', [], 'revision')],
924 [('r', 'rev', [], 'revision')],
919 'hg log [-r A] [-r B] [file]'),
925 'hg log [-r A] [-r B] [file]'),
920 "manifest": (manifest, [], 'hg manifest [rev]'),
926 "manifest": (manifest, [], 'hg manifest [rev]'),
921 "parents": (parents, [], 'hg parents [node]'),
927 "parents": (parents, [], 'hg parents [node]'),
922 "pull": (pull,
928 "^pull": (pull,
923 [('u', 'update', None, 'update working directory')],
929 [('u', 'update', None, 'update working directory')],
924 'hg pull [options] [source]'),
930 'hg pull [options] [source]'),
925 "push": (push, [], 'hg push <destination>'),
931 "^push": (push, [], 'hg push <destination>'),
926 "rawcommit": (rawcommit,
932 "rawcommit": (rawcommit,
927 [('p', 'parent', [], 'parent'),
933 [('p', 'parent', [], 'parent'),
928 ('d', 'date', "", 'date code'),
934 ('d', 'date', "", 'date code'),
@@ -932,18 +938,18 b' table = {'
932 ('l', 'logfile', "", 'commit text file')],
938 ('l', 'logfile', "", 'commit text file')],
933 'hg rawcommit [options] [files]'),
939 'hg rawcommit [options] [files]'),
934 "recover": (recover, [], "hg recover"),
940 "recover": (recover, [], "hg recover"),
935 "remove|rm": (remove, [], "hg remove [files]"),
941 "^remove|rm": (remove, [], "hg remove [files]"),
936 "revert": (revert,
942 "revert": (revert,
937 [("n", "nonrecursive", None, "don't recurse into subdirs"),
943 [("n", "nonrecursive", None, "don't recurse into subdirs"),
938 ("r", "rev", "", "revision")],
944 ("r", "rev", "", "revision")],
939 "hg revert [files|dirs]"),
945 "hg revert [files|dirs]"),
940 "root": (root, [], "hg root"),
946 "root": (root, [], "hg root"),
941 "serve": (serve, [('p', 'port', 8000, 'listen port'),
947 "^serve": (serve, [('p', 'port', 8000, 'listen port'),
942 ('a', 'address', '', 'interface address'),
948 ('a', 'address', '', 'interface address'),
943 ('n', 'name', os.getcwd(), 'repository name'),
949 ('n', 'name', os.getcwd(), 'repository name'),
944 ('t', 'templates', "", 'template map')],
950 ('t', 'templates', "", 'template map')],
945 "hg serve [options]"),
951 "hg serve [options]"),
946 "status": (status, [], 'hg status'),
952 "^status": (status, [], 'hg status'),
947 "tag": (tag, [('t', 'text', "", 'commit text'),
953 "tag": (tag, [('t', 'text', "", 'commit text'),
948 ('d', 'date', "", 'date code'),
954 ('d', 'date', "", 'date code'),
949 ('u', 'user', "", 'user')],
955 ('u', 'user', "", 'user')],
@@ -951,7 +957,7 b' table = {'
951 "tags": (tags, [], 'hg tags'),
957 "tags": (tags, [], 'hg tags'),
952 "tip": (tip, [], 'hg tip'),
958 "tip": (tip, [], 'hg tip'),
953 "undo": (undo, [], 'hg undo'),
959 "undo": (undo, [], 'hg undo'),
954 "update|up|checkout|co":
960 "^update|up|checkout|co":
955 (update,
961 (update,
956 [('m', 'merge', None, 'allow merging of conflicts'),
962 [('m', 'merge', None, 'allow merging of conflicts'),
957 ('C', 'clean', None, 'overwrite locally modified files')],
963 ('C', 'clean', None, 'overwrite locally modified files')],
@@ -1,40 +1,18 b''
1 + hg -q help
1 + hg -q help
2 hg commands:
2 basic hg commands (use -v for long list):
3
3
4 add add the specified files on the next commit
4 add add the specified files on the next commit
5 addremove add all new files, delete all missing files
5 clone make a copy of an existing repository
6 annotate show changeset information per file line
6 commit commit the specified files or all outstanding changes
7 cat output the latest or given revision of a file
7 diff diff working directory (or selected files)
8 clone make a copy of an existing repository
8 init create a new repository in the current directory
9 commit commit the specified files or all outstanding changes
9 log show the revision history of the repository or a single file
10 copy mark a file as copied or renamed for the next commit
10 pull pull changes from the specified source
11 diff diff working directory (or selected files)
11 push push changes to the specified destination
12 export dump the header and diffs for one or more changesets
12 remove remove the specified files on the next commit
13 forget don't add the specified files on the next commit
13 serve export the repository via HTTP
14 heads show current repository heads
14 status show changed files in the working directory
15 help show help for a given command or all commands
15 update update or merge working directory
16 identify print information about the working copy
17 import import an ordered set of patches
18 init create a new repository in the current directory
19 log show the revision history of the repository or a single file
20 manifest output the latest or given revision of the project manifest
21 parents show the parents of the current working dir
22 pull pull changes from the specified source
23 push push changes to the specified destination
24 rawcommit raw commit interface
25 recover roll back an interrupted transaction
26 remove remove the specified files on the next commit
27 revert revert modified files or dirs back to their unmodified states
28 root print the root (top) of the current working dir
29 serve export the repository via HTTP
30 status show changed files in the working directory
31 tag add a tag for the current tip or a given revision
32 tags list repository tags
33 tip show the tip revision
34 undo undo the last transaction
35 update update or merge working directory
36 verify verify the integrity of the repository
37 version output version and copyright information
38 + hg add -h
16 + hg add -h
39 hg add: option -h not recognized
17 hg add: option -h not recognized
40 hg add [files]
18 hg add [files]
@@ -51,40 +29,18 b' diff working directory (or selected file'
51 hg: unknown command foo
29 hg: unknown command foo
52 + hg -q commands
30 + hg -q commands
53 hg: unknown command 'commands'
31 hg: unknown command 'commands'
54 hg commands:
32 basic hg commands (use -v for long list):
55
33
56 add add the specified files on the next commit
34 add add the specified files on the next commit
57 addremove add all new files, delete all missing files
35 clone make a copy of an existing repository
58 annotate show changeset information per file line
36 commit commit the specified files or all outstanding changes
59 cat output the latest or given revision of a file
37 diff diff working directory (or selected files)
60 clone make a copy of an existing repository
38 init create a new repository in the current directory
61 commit commit the specified files or all outstanding changes
39 log show the revision history of the repository or a single file
62 copy mark a file as copied or renamed for the next commit
40 pull pull changes from the specified source
63 diff diff working directory (or selected files)
41 push push changes to the specified destination
64 export dump the header and diffs for one or more changesets
42 remove remove the specified files on the next commit
65 forget don't add the specified files on the next commit
43 serve export the repository via HTTP
66 heads show current repository heads
44 status show changed files in the working directory
67 help show help for a given command or all commands
45 update update or merge working directory
68 identify print information about the working copy
69 import import an ordered set of patches
70 init create a new repository in the current directory
71 log show the revision history of the repository or a single file
72 manifest output the latest or given revision of the project manifest
73 parents show the parents of the current working dir
74 pull pull changes from the specified source
75 push push changes to the specified destination
76 rawcommit raw commit interface
77 recover roll back an interrupted transaction
78 remove remove the specified files on the next commit
79 revert revert modified files or dirs back to their unmodified states
80 root print the root (top) of the current working dir
81 serve export the repository via HTTP
82 status show changed files in the working directory
83 tag add a tag for the current tip or a given revision
84 tags list repository tags
85 tip show the tip revision
86 undo undo the last transaction
87 update update or merge working directory
88 verify verify the integrity of the repository
89 version output version and copyright information
90 + exit 0
46 + exit 0
General Comments 0
You need to be logged in to leave comments. Login now