Show More
@@ -1493,7 +1493,10 b' def help_(ui, name=None, with_version=Fa' | |||
|
1493 | 1493 | f = f.lstrip("^") |
|
1494 | 1494 | if not ui.debugflag and f.startswith("debug"): |
|
1495 | 1495 | continue |
|
1496 |
doc = |
|
|
1496 | doc = e[0].__doc__ | |
|
1497 | if doc and 'DEPRECATED' in doc and not ui.verbose: | |
|
1498 | continue | |
|
1499 | doc = gettext(doc) | |
|
1497 | 1500 | if not doc: |
|
1498 | 1501 | doc = _("(no help text available)") |
|
1499 | 1502 | h[f] = doc.splitlines(0)[0].rstrip() |
@@ -73,11 +73,25 b' def debugfoobar(ui, repo, *args, **opts)' | |||
|
73 | 73 | "yet another debug command" |
|
74 | 74 | pass |
|
75 | 75 | |
|
76 | cmdtable = {"debugfoobar": (debugfoobar, (), "hg debugfoobar")} | |
|
76 | def foo(ui, repo, *args, **opts): | |
|
77 | """yet another foo command | |
|
78 | ||
|
79 | This command has been DEPRECATED since forever. | |
|
80 | """ | |
|
81 | pass | |
|
82 | ||
|
83 | cmdtable = { | |
|
84 | "debugfoobar": (debugfoobar, (), "hg debugfoobar"), | |
|
85 | "foo": (foo, (), "hg foo") | |
|
86 | } | |
|
77 | 87 | EOF |
|
78 | 88 | debugpath=`pwd`/debugextension.py |
|
79 | 89 | echo "debugextension = $debugpath" >> $HGRCPATH |
|
90 | echo "% hg help" | |
|
80 | 91 | hg help debugextension |
|
92 | echo "% hg help --verbose" | |
|
93 | hg --verbose help debugextension | |
|
94 | echo "% hg help --debug" | |
|
81 | 95 | hg --debug help debugextension |
|
82 | 96 | echo 'debugextension = !' >> $HGRCPATH |
|
83 | 97 |
@@ -19,15 +19,47 b' Foo' | |||
|
19 | 19 | empty extension - empty cmdtable |
|
20 | 20 | |
|
21 | 21 | no commands defined |
|
22 | % hg help | |
|
22 | 23 | debugextension extension - only debugcommands |
|
23 | 24 | |
|
24 | 25 | no commands defined |
|
26 | % hg help --verbose | |
|
27 | debugextension extension - only debugcommands | |
|
28 | ||
|
29 | list of commands: | |
|
30 | ||
|
31 | foo: | |
|
32 | yet another foo command | |
|
33 | ||
|
34 | enabled extensions: | |
|
35 | ||
|
36 | debugextension only debugcommands | |
|
37 | ||
|
38 | global options: | |
|
39 | -R --repository repository root directory or symbolic path name | |
|
40 | --cwd change working directory | |
|
41 | -y --noninteractive do not prompt, assume 'yes' for any required answers | |
|
42 | -q --quiet suppress output | |
|
43 | -v --verbose enable additional output | |
|
44 | --config set/override config option | |
|
45 | --debug enable debugging output | |
|
46 | --debugger start debugger | |
|
47 | --encoding set the charset encoding (default: ascii) | |
|
48 | --encodingmode set the charset encoding mode (default: strict) | |
|
49 | --traceback print traceback on exception | |
|
50 | --time time how long the command takes | |
|
51 | --profile print command execution profile | |
|
52 | --version output version information and exit | |
|
53 | -h --help display help and exit | |
|
54 | % hg help --debug | |
|
25 | 55 | debugextension extension - only debugcommands |
|
26 | 56 | |
|
27 | 57 | list of commands: |
|
28 | 58 | |
|
29 | 59 | debugfoobar: |
|
30 | 60 | yet another debug command |
|
61 | foo: | |
|
62 | yet another foo command | |
|
31 | 63 | |
|
32 | 64 | enabled extensions: |
|
33 | 65 |
General Comments 0
You need to be logged in to leave comments.
Login now