Mercurial > hg
comparison mercurial/help.py @ 7804:06afe0f9dbf8
help: some language fixes for help topics
author | timeless <timeless@gmail.com> |
---|---|
date | Sat, 28 Feb 2009 12:21:41 +0100 |
parents | 14a42208d8af |
children | cf6ec23a1bb5 |
comparison
equal
deleted
inserted
replaced
7801:e5627562b9f2 | 7804:06afe0f9dbf8 |
---|---|
39 is the offset of the local timezone, in seconds west of UTC (negative | 39 is the offset of the local timezone, in seconds west of UTC (negative |
40 if the timezone is east of UTC). | 40 if the timezone is east of UTC). |
41 | 41 |
42 The log command also accepts date ranges: | 42 The log command also accepts date ranges: |
43 | 43 |
44 "<{date}" - on or before a given date | 44 "<{datetime}" - at or before a given date/time |
45 ">{date}" - on or after a given date | 45 ">{datetime}" - on or after a given date/time |
46 "{date} to {date}" - a date range, inclusive | 46 "{datetime} to {datetime}" - a date range, inclusive |
47 "-{days}" - within a given number of days of today | 47 "-{days}" - within a given number of days of today |
48 ''')), | 48 ''')), |
49 | 49 |
50 (["patterns"], _("File Name Patterns"), | 50 (["patterns"], _("File Name Patterns"), |
51 _(r''' | 51 _(r''' |
55 By default, Mercurial treats filenames as shell-style extended | 55 By default, Mercurial treats filenames as shell-style extended |
56 glob patterns. | 56 glob patterns. |
57 | 57 |
58 Alternate pattern notations must be specified explicitly. | 58 Alternate pattern notations must be specified explicitly. |
59 | 59 |
60 To use a plain path name without any pattern matching, start a | 60 To use a plain path name without any pattern matching, start it |
61 name with "path:". These path names must match completely, from | 61 with "path:". These path names must completely match starting at |
62 the root of the current repository. | 62 the current repository root. |
63 | 63 |
64 To use an extended glob, start a name with "glob:". Globs are | 64 To use an extended glob, start a name with "glob:". Globs are |
65 rooted at the current directory; a glob such as "*.c" will match | 65 rooted at the current directory; a glob such as "*.c" will only |
66 files ending in ".c" in the current directory only. | 66 match files in the current directory ending with ".c". |
67 | 67 |
68 The supported glob syntax extensions are "**" to match any string | 68 The supported glob syntax extensions are "**" to match any string |
69 across path separators, and "{a,b}" to mean "a or b". | 69 across path separators and "{a,b}" to mean "a or b". |
70 | 70 |
71 To use a Perl/Python regular expression, start a name with "re:". | 71 To use a Perl/Python regular expression, start a name with "re:". |
72 Regexp pattern matching is anchored at the root of the repository. | 72 Regexp pattern matching is anchored at the root of the repository. |
73 | 73 |
74 Plain examples: | 74 Plain examples: |
79 | 79 |
80 Glob examples: | 80 Glob examples: |
81 | 81 |
82 glob:*.c any name ending in ".c" in the current directory | 82 glob:*.c any name ending in ".c" in the current directory |
83 *.c any name ending in ".c" in the current directory | 83 *.c any name ending in ".c" in the current directory |
84 **.c any name ending in ".c" in the current directory, or | 84 **.c any name ending in ".c" in any subdirectory of the |
85 any subdirectory | 85 current directory including itself. |
86 foo/*.c any name ending in ".c" in the directory foo | 86 foo/*.c any name ending in ".c" in the directory foo |
87 foo/**.c any name ending in ".c" in the directory foo, or any | 87 foo/**.c any name ending in ".c" in any subdirectory of foo |
88 subdirectory | 88 including itself. |
89 | 89 |
90 Regexp examples: | 90 Regexp examples: |
91 | 91 |
92 re:.*\.c$ any name ending in ".c", anywhere in the repository | 92 re:.*\.c$ any name ending in ".c", anywhere in the repository |
93 | 93 |
95 | 95 |
96 (['environment', 'env'], _('Environment Variables'), | 96 (['environment', 'env'], _('Environment Variables'), |
97 _(r''' | 97 _(r''' |
98 HG:: | 98 HG:: |
99 Path to the 'hg' executable, automatically passed when running hooks, | 99 Path to the 'hg' executable, automatically passed when running hooks, |
100 extensions or external tools. If unset or empty, an executable named | 100 extensions or external tools. If unset or empty, this is the hg |
101 'hg' (with com/exe/bat/cmd extension on Windows) is searched. | 101 exutable's name if it's frozen, or an executable named 'hg' |
102 (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on | |
103 Windows) is searched. | |
102 | 104 |
103 HGEDITOR:: | 105 HGEDITOR:: |
104 This is the name of the editor to use when committing. See EDITOR. | 106 This is the name of the editor to run when committing. See EDITOR. |
105 | 107 |
106 (deprecated, use .hgrc) | 108 (deprecated, use .hgrc) |
107 | 109 |
108 HGENCODING:: | 110 HGENCODING:: |
109 This overrides the default locale setting detected by Mercurial. | 111 This overrides the default locale setting detected by Mercurial. |
111 changeset descriptions, tag names, and branches. This setting can | 113 changeset descriptions, tag names, and branches. This setting can |
112 be overridden with the --encoding command-line option. | 114 be overridden with the --encoding command-line option. |
113 | 115 |
114 HGENCODINGMODE:: | 116 HGENCODINGMODE:: |
115 This sets Mercurial's behavior for handling unknown characters | 117 This sets Mercurial's behavior for handling unknown characters |
116 while transcoding user inputs. The default is "strict", which | 118 while transcoding user input. The default is "strict", which |
117 causes Mercurial to abort if it can't translate a character. Other | 119 causes Mercurial to abort if it can't map a character. Other |
118 settings include "replace", which replaces unknown characters, and | 120 settings include "replace", which replaces unknown characters, and |
119 "ignore", which drops them. This setting can be overridden with | 121 "ignore", which drops them. This setting can be overridden with |
120 the --encodingmode command-line option. | 122 the --encodingmode command-line option. |
121 | 123 |
122 HGMERGE:: | 124 HGMERGE:: |
127 (deprecated, use .hgrc) | 129 (deprecated, use .hgrc) |
128 | 130 |
129 HGRCPATH:: | 131 HGRCPATH:: |
130 A list of files or directories to search for hgrc files. Item | 132 A list of files or directories to search for hgrc files. Item |
131 separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set, | 133 separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set, |
132 platform default search path is used. If empty, only .hg/hgrc of | 134 platform default search path is used. If empty, only the .hg/hgrc |
133 current repository is read. | 135 from the current repository is read. |
134 | 136 |
135 For each element in path, if a directory, all entries in directory | 137 For each element in path, if a directory, all entries in directory |
136 ending with ".rc" are added to path. Else, element itself is | 138 ending with ".rc" are added to path. Else, element itself is |
137 added to path. | 139 added to path. |
138 | 140 |
139 HGUSER:: | 141 HGUSER:: |
140 This is the string used for the author of a commit. | 142 This is the string used as the author of a commit. |
141 | 143 |
142 (deprecated, use .hgrc) | 144 (deprecated, use .hgrc) |
143 | 145 |
144 EMAIL:: | 146 EMAIL:: |
145 If HGUSER is not set, this will be used as the author for a commit. | 147 If HGUSER is not set, this will be used as the author for a commit. |
146 | 148 |
147 LOGNAME:: | 149 LOGNAME:: |
148 If neither HGUSER nor EMAIL is set, LOGNAME will be used (with | 150 If neither HGUSER nor EMAIL is set, LOGNAME will be used (with |
149 '@hostname' appended) as the author value for a commit. | 151 '@hostname' appended) as the author value of a commit. |
150 | 152 |
151 VISUAL:: | 153 VISUAL:: |
152 This is the name of the editor to use when committing. See EDITOR. | 154 This is the name of the editor to use when committing. See EDITOR. |
153 | 155 |
154 EDITOR:: | 156 EDITOR:: |
159 non-empty one is chosen. If all of them are empty, the editor | 161 non-empty one is chosen. If all of them are empty, the editor |
160 defaults to 'vi'. | 162 defaults to 'vi'. |
161 | 163 |
162 PYTHONPATH:: | 164 PYTHONPATH:: |
163 This is used by Python to find imported modules and may need to be set | 165 This is used by Python to find imported modules and may need to be set |
164 appropriately if Mercurial is not installed system-wide. | 166 appropriately if this Mercurial is not installed system-wide. |
165 ''')), | 167 ''')), |
166 | 168 |
167 (['revs', 'revisions'], _('Specifying Single Revisions'), | 169 (['revs', 'revisions'], _('Specifying Single Revisions'), |
168 _(r''' | 170 _(r''' |
169 Mercurial accepts several notations for identifying individual | 171 Mercurial supports several ways to specify individual |
170 revisions. | 172 revisions. |
171 | 173 |
172 A plain integer is treated as a revision number. Negative | 174 A plain integer is treated as a revision number. Negative |
173 integers are treated as offsets from the tip, with -1 denoting the | 175 integers are treated as toplogical offsets from the tip, with |
174 tip. | 176 -1 denoting the tip. As such, negative numbers are only useful |
177 if you've memorized your local tree numbers and want to save | |
178 typing a single digit. This editor suggests copy and paste. | |
175 | 179 |
176 A 40-digit hexadecimal string is treated as a unique revision | 180 A 40-digit hexadecimal string is treated as a unique revision |
177 identifier. | 181 identifier. |
178 | 182 |
179 A hexadecimal string less than 40 characters long is treated as a | 183 A hexadecimal string less than 40 characters long is treated as a |
180 unique revision identifier, and referred to as a short-form | 184 unique revision identifier, and referred to as a short-form |
181 identifier. A short-form identifier is only valid if it is the | 185 identifier. A short-form identifier is only valid if it is the |
182 prefix of one full-length identifier. | 186 prefix of exactly one full-length identifier. |
183 | 187 |
184 Any other string is treated as a tag name, which is a symbolic | 188 Any other string is treated as a tag name, which is a symbolic |
185 name associated with a revision identifier. Tag names may not | 189 name associated with a revision identifier. Tag names may not |
186 contain the ":" character. | 190 contain the ":" character. |
187 | 191 |
198 ''')), | 202 ''')), |
199 | 203 |
200 (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'), | 204 (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'), |
201 _(r''' | 205 _(r''' |
202 When Mercurial accepts more than one revision, they may be | 206 When Mercurial accepts more than one revision, they may be |
203 specified individually, or provided as a continuous range, | 207 specified individually, or provided as a topologically continuous |
204 separated by the ":" character. | 208 range, separated by the ":" character. |
205 | 209 |
206 The syntax of range notation is [BEGIN]:[END], where BEGIN and END | 210 The syntax of range notation is [BEGIN]:[END], where BEGIN and END |
207 are revision identifiers. Both BEGIN and END are optional. If | 211 are revision identifiers. Both BEGIN and END are optional. If |
208 BEGIN is not specified, it defaults to revision number 0. If END | 212 BEGIN is not specified, it defaults to revision number 0. If END |
209 is not specified, it defaults to the tip. The range ":" thus | 213 is not specified, it defaults to the tip. The range ":" thus |
211 | 215 |
212 If BEGIN is greater than END, revisions are treated in reverse | 216 If BEGIN is greater than END, revisions are treated in reverse |
213 order. | 217 order. |
214 | 218 |
215 A range acts as a closed interval. This means that a range of 3:5 | 219 A range acts as a closed interval. This means that a range of 3:5 |
216 gives 3, 4 and 5. Similarly, a range of 4:2 gives 4, 3, and 2. | 220 gives 3, 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6. |
217 ''')), | 221 ''')), |
218 | 222 |
219 (['diffs'], _('Diff Formats'), | 223 (['diffs'], _('Diff Formats'), |
220 _(r''' | 224 _(r''' |
221 Mercurial's default format for showing changes between two versions | 225 Mercurial's default format for showing changes between two versions |
223 can be used by GNU patch and many other standard tools. | 227 can be used by GNU patch and many other standard tools. |
224 | 228 |
225 While this standard format is often enough, it does not encode the | 229 While this standard format is often enough, it does not encode the |
226 following information: | 230 following information: |
227 | 231 |
228 - executable status | 232 - executable status and other permission bits |
229 - copy or rename information | 233 - copy or rename information |
230 - changes in binary files | 234 - changes in binary files |
231 - creation or deletion of empty files | 235 - creation or deletion of empty files |
232 | 236 |
233 Mercurial also supports the extended diff format from the git VCS | 237 Mercurial also supports the extended diff format from the git VCS |
234 which addresses these limitations. The git diff format is not | 238 which addresses these limitations. The git diff format is not |
235 produced by default because there are very few tools which | 239 produced by default because a few widespread tools still do not |
236 understand this format. | 240 understand this format. |
237 | 241 |
238 This means that when generating diffs from a Mercurial repository | 242 This means that when generating diffs from a Mercurial repository |
239 (e.g. with "hg export"), you should be careful about things like | 243 (e.g. with "hg export"), you should be careful about things like |
240 file copies and renames or other things mentioned above, because | 244 file copies and renames or other things mentioned above, because |
253 Mercurial allows you to customize output of commands through | 257 Mercurial allows you to customize output of commands through |
254 templates. You can either pass in a template from the command line, | 258 templates. You can either pass in a template from the command line, |
255 via the --template option, or select an existing template-style (--style). | 259 via the --template option, or select an existing template-style (--style). |
256 | 260 |
257 You can customize output for any "log-like" command: log, outgoing, | 261 You can customize output for any "log-like" command: log, outgoing, |
258 incoming, tip, parents, heads and glog are all template-enabled. | 262 incoming, tip, parents, heads and glog. |
259 | 263 |
260 Three styles are packaged with Mercurial: default (the style used | 264 Three styles are packaged with Mercurial: default (the style used |
261 when no explicit preference is passed), compact and changelog. Usage: | 265 when no explicit preference is passed), compact and changelog. Usage: |
262 | 266 |
263 $ hg log -r1 --style changelog | 267 $ hg log -r1 --style changelog |
288 - tags: List of strings. Any tags associated with the changeset. | 292 - tags: List of strings. Any tags associated with the changeset. |
289 | 293 |
290 The "date" keyword does not produce human-readable output. If you | 294 The "date" keyword does not produce human-readable output. If you |
291 want to use a date in your output, you can use a filter to process it. | 295 want to use a date in your output, you can use a filter to process it. |
292 Filters are functions which return a string based on the input variable. | 296 Filters are functions which return a string based on the input variable. |
293 You can also use a chain of filters to get the wanted output: | 297 You can also use a chain of filters to get the desired output: |
294 | 298 |
295 $ hg tip --template "{date|isodate}\n" | 299 $ hg tip --template "{date|isodate}\n" |
296 2008-08-21 18:22 +0000 | 300 2008-08-21 18:22 +0000 |
297 | 301 |
298 List of filters: | 302 List of filters: |
344 Paths in the local filesystem can either point to Mercurial | 348 Paths in the local filesystem can either point to Mercurial |
345 repositories or to bundle files (as created by 'hg bundle' or | 349 repositories or to bundle files (as created by 'hg bundle' or |
346 'hg incoming --bundle'). | 350 'hg incoming --bundle'). |
347 | 351 |
348 An optional identifier after # indicates a particular branch, tag, | 352 An optional identifier after # indicates a particular branch, tag, |
349 or changeset to deal with in the remote repository. | 353 or changeset to use from the remote repository. |
350 | 354 |
351 Some features, such as pushing to http:// and https:// URLs are | 355 Some features, such as pushing to http:// and https:// URLs are |
352 only possible if the feature is explicitly enabled on the | 356 only possible if the feature is explicitly enabled on the |
353 remote Mercurial server. | 357 remote Mercurial server. |
354 | 358 |
375 ... | 379 ... |
376 | 380 |
377 You can then use the alias for any command that uses a url (for example | 381 You can then use the alias for any command that uses a url (for example |
378 'hg pull alias1' would pull from the 'alias1' path). | 382 'hg pull alias1' would pull from the 'alias1' path). |
379 | 383 |
380 Two path aliases are more important because they are used as defaults | 384 Two path aliases are special because they are used as defaults |
381 when you do not provide the url to a command: | 385 when you do not provide the url to a command: |
382 | 386 |
383 default: | 387 default: |
384 When you create a repository with hg clone, the clone command saves | 388 When you create a repository with hg clone, the clone command saves |
385 the location of the source repository as the 'default' path. This is | 389 the location of the source repository as the new repository's |
386 then used when you omit a path from the push and pull commands. | 390 'default' path. This is then used when you omit path from push- |
391 and pull-like commands (including in and out). | |
387 | 392 |
388 default-push: | 393 default-push: |
389 The push command will look for a path named 'default-push', and | 394 The push command will look for a path named 'default-push', and |
390 prefer it over 'default' if both are defined. | 395 prefer it over 'default' if both are defined. |
391 ''')), | 396 ''')), |