Show More
@@ -92,11 +92,10 b' def show_doc(ui):' | |||
|
92 | 92 | ui.write(_(" aliases: %s\n\n") % " ".join(d['aliases'])) |
|
93 | 93 | |
|
94 | 94 | # print topics |
|
95 | for t in helptable: | |
|
95 | for t, doc in helptable: | |
|
96 | 96 | l = t.split("|") |
|
97 | 97 | section = l[-1] |
|
98 | 98 | underlined(_(section).upper()) |
|
99 | doc = helptable[t] | |
|
100 | 99 | if callable(doc): |
|
101 | 100 | doc = doc() |
|
102 | 101 | ui.write(_(doc)) |
@@ -1321,16 +1321,16 b' def help_(ui, name=None, with_version=Fa' | |||
|
1321 | 1321 | |
|
1322 | 1322 | def helptopic(name): |
|
1323 | 1323 | v = None |
|
1324 | for i in help.helptable: | |
|
1324 | for i, d in help.helptable: | |
|
1325 | 1325 | l = i.split('|') |
|
1326 | 1326 | if name in l: |
|
1327 | 1327 | v = i |
|
1328 | 1328 | header = l[-1] |
|
1329 | doc = d | |
|
1329 | 1330 | if not v: |
|
1330 | 1331 | raise cmdutil.UnknownCommand(name) |
|
1331 | 1332 | |
|
1332 | 1333 | # description |
|
1333 | doc = help.helptable[v] | |
|
1334 | 1334 | if not doc: |
|
1335 | 1335 | doc = _("(No help text available)") |
|
1336 | 1336 | if callable(doc): |
@@ -1404,7 +1404,7 b' def help_(ui, name=None, with_version=Fa' | |||
|
1404 | 1404 | if ui.verbose: |
|
1405 | 1405 | ui.write(_("\nspecial help topics:\n")) |
|
1406 | 1406 | topics = [] |
|
1407 | for i in help.helptable: | |
|
1407 | for i, d in help.helptable: | |
|
1408 | 1408 | l = i.split('|') |
|
1409 | 1409 | topics.append((", ".join(l[:-1]), l[-1])) |
|
1410 | 1410 | topics_len = max([len(s[0]) for s in topics]) |
@@ -5,8 +5,8 b'' | |||
|
5 | 5 | # This software may be used and distributed according to the terms |
|
6 | 6 | # of the GNU General Public License, incorporated herein by reference. |
|
7 | 7 | |
|
8 |
helptable = |
|
|
9 |
"dates|Date Formats" |
|
|
8 | helptable = ( | |
|
9 | ("dates|Date Formats", | |
|
10 | 10 | r''' |
|
11 | 11 | Some commands allow the user to specify a date: |
|
12 | 12 | backout, commit, import, tag: Specify the commit date. |
@@ -43,9 +43,55 b' helptable = {' | |||
|
43 | 43 | ">{date}" - on or after a given date |
|
44 | 44 | "{date} to {date}" - a date range, inclusive |
|
45 | 45 | "-{days}" - within a given number of days of today |
|
46 | ''', | |
|
46 | '''), | |
|
47 | ||
|
48 | ("patterns|File Name Patterns", | |
|
49 | r''' | |
|
50 | Mercurial accepts several notations for identifying one or more | |
|
51 | files at a time. | |
|
52 | ||
|
53 | By default, Mercurial treats filenames as shell-style extended | |
|
54 | glob patterns. | |
|
55 | ||
|
56 | Alternate pattern notations must be specified explicitly. | |
|
57 | ||
|
58 | To use a plain path name without any pattern matching, start a | |
|
59 | name with "path:". These path names must match completely, from | |
|
60 | the root of the current repository. | |
|
61 | ||
|
62 | To use an extended glob, start a name with "glob:". Globs are | |
|
63 | rooted at the current directory; a glob such as "*.c" will match | |
|
64 | files ending in ".c" in the current directory only. | |
|
65 | ||
|
66 | The supported glob syntax extensions are "**" to match any string | |
|
67 | across path separators, and "{a,b}" to mean "a or b". | |
|
47 | 68 |
|
|
48 | 'environment|env|Environment Variables': | |
|
69 | To use a Perl/Python regular expression, start a name with "re:". | |
|
70 | Regexp pattern matching is anchored at the root of the repository. | |
|
71 | ||
|
72 | Plain examples: | |
|
73 | ||
|
74 | path:foo/bar a name bar in a directory named foo in the root of | |
|
75 | the repository | |
|
76 | path:path:name a file or directory named "path:name" | |
|
77 | ||
|
78 | Glob examples: | |
|
79 | ||
|
80 | glob:*.c any name ending in ".c" in the current directory | |
|
81 | *.c any name ending in ".c" in the current directory | |
|
82 | **.c any name ending in ".c" in the current directory, or | |
|
83 | any subdirectory | |
|
84 | foo/*.c any name ending in ".c" in the directory foo | |
|
85 | foo/**.c any name ending in ".c" in the directory foo, or any | |
|
86 | subdirectory | |
|
87 | ||
|
88 | Regexp examples: | |
|
89 | ||
|
90 | re:.*\.c$ any name ending in ".c", anywhere in the repository | |
|
91 | ||
|
92 | '''), | |
|
93 | ||
|
94 | ('environment|env|Environment Variables', | |
|
49 | 95 | r''' |
|
50 | 96 | HG:: |
|
51 | 97 | Path to the 'hg' executable, automatically passed when running hooks, |
@@ -114,51 +160,5 b' EDITOR::' | |||
|
114 | 160 | PYTHONPATH:: |
|
115 | 161 | This is used by Python to find imported modules and may need to be set |
|
116 | 162 | appropriately if Mercurial is not installed system-wide. |
|
117 | ''', | |
|
118 | ||
|
119 | "patterns|File Name Patterns": r''' | |
|
120 | Mercurial accepts several notations for identifying one or more | |
|
121 | files at a time. | |
|
122 | ||
|
123 | By default, Mercurial treats filenames as shell-style extended | |
|
124 | glob patterns. | |
|
125 | ||
|
126 | Alternate pattern notations must be specified explicitly. | |
|
127 | ||
|
128 | To use a plain path name without any pattern matching, start a | |
|
129 | name with "path:". These path names must match completely, from | |
|
130 | the root of the current repository. | |
|
131 | ||
|
132 | To use an extended glob, start a name with "glob:". Globs are | |
|
133 | rooted at the current directory; a glob such as "*.c" will match | |
|
134 | files ending in ".c" in the current directory only. | |
|
135 | ||
|
136 | The supported glob syntax extensions are "**" to match any string | |
|
137 | across path separators, and "{a,b}" to mean "a or b". | |
|
138 | ||
|
139 | To use a Perl/Python regular expression, start a name with "re:". | |
|
140 | Regexp pattern matching is anchored at the root of the repository. | |
|
141 | ||
|
142 | Plain examples: | |
|
143 | ||
|
144 | path:foo/bar a name bar in a directory named foo in the root of | |
|
145 | the repository | |
|
146 | path:path:name a file or directory named "path:name" | |
|
147 | ||
|
148 | Glob examples: | |
|
149 | ||
|
150 | glob:*.c any name ending in ".c" in the current directory | |
|
151 | *.c any name ending in ".c" in the current directory | |
|
152 | **.c any name ending in ".c" in the current directory, or | |
|
153 | any subdirectory | |
|
154 | foo/*.c any name ending in ".c" in the directory foo | |
|
155 | foo/**.c any name ending in ".c" in the directory foo, or any | |
|
156 | subdirectory | |
|
157 | ||
|
158 | Regexp examples: | |
|
159 | ||
|
160 | re:.*\.c$ any name ending in ".c", anywhere in the repository | |
|
161 | ||
|
162 | ''', | |
|
163 | } | |
|
164 | ||
|
163 | '''), | |
|
164 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now