Show More
@@ -52,21 +52,18 b' def listexts(header, exts, maxlength):' | |||||
52 | def extshelp(): |
|
52 | def extshelp(): | |
53 | doc = _(r''' |
|
53 | doc = _(r''' | |
54 | Mercurial has the ability to add new features through the use of |
|
54 | Mercurial has the ability to add new features through the use of | |
55 | extensions. Extensions may add new commands, add options to |
|
55 | extensions. Extensions may add new commands, add options to existing | |
56 |
|
|
56 | commands, change the default behavior of commands, or implement hooks. | |
57 | implement hooks. |
|
|||
58 |
|
57 | |||
59 | Extensions are not loaded by default for a variety of reasons: |
|
58 | Extensions are not loaded by default for a variety of reasons: they can | |
60 |
|
|
59 | increase startup overhead; they may be meant for advanced usage only; they | |
61 | advanced usage only; they may provide potentially dangerous |
|
60 | may provide potentially dangerous abilities (such as letting you destroy | |
62 | abilities (such as letting you destroy or modify history); they |
|
61 | or modify history); they might not be ready for prime time; or they may | |
63 | might not be ready for prime time; or they may alter some |
|
62 | alter some usual behaviors of stock Mercurial. It is thus up to the user | |
64 | usual behaviors of stock Mercurial. It is thus up to the user to |
|
63 | to activate extensions as needed. | |
65 | activate extensions as needed. |
|
|||
66 |
|
64 | |||
67 | To enable the "foo" extension, either shipped with Mercurial |
|
65 | To enable the "foo" extension, either shipped with Mercurial or in the | |
68 |
|
|
66 | Python search path, create an entry for it in your hgrc, like this: | |
69 | hgrc, like this: |
|
|||
70 |
|
67 | |||
71 | [extensions] |
|
68 | [extensions] | |
72 | foo = |
|
69 | foo = | |
@@ -76,8 +73,8 b' def extshelp():' | |||||
76 | [extensions] |
|
73 | [extensions] | |
77 | myfeature = ~/.hgext/myfeature.py |
|
74 | myfeature = ~/.hgext/myfeature.py | |
78 |
|
75 | |||
79 | To explicitly disable an extension enabled in an hgrc of broader |
|
76 | To explicitly disable an extension enabled in an hgrc of broader scope, | |
80 |
|
|
77 | prepend its path with !: | |
81 |
|
78 | |||
82 | [extensions] |
|
79 | [extensions] | |
83 | # disabling extension bar residing in /path/to/extension/bar.py |
|
80 | # disabling extension bar residing in /path/to/extension/bar.py | |
@@ -121,10 +118,10 b' helptable = (' | |||||
121 |
|
118 | |||
122 | "1165432709 0" (Wed Dec 6 13:18:29 2006 UTC) |
|
119 | "1165432709 0" (Wed Dec 6 13:18:29 2006 UTC) | |
123 |
|
120 | |||
124 | This is the internal representation format for dates. unixtime is |
|
121 | This is the internal representation format for dates. unixtime is the | |
125 |
|
|
122 | number of seconds since the epoch (1970-01-01 00:00 UTC). offset is the | |
126 |
offset |
|
123 | offset of the local timezone, in seconds west of UTC (negative if the | |
127 |
|
|
124 | timezone is east of UTC). | |
128 |
|
125 | |||
129 | The log command also accepts date ranges: |
|
126 | The log command also accepts date ranges: | |
130 |
|
127 | |||
@@ -136,27 +133,27 b' helptable = (' | |||||
136 |
|
133 | |||
137 | (["patterns"], _("File Name Patterns"), |
|
134 | (["patterns"], _("File Name Patterns"), | |
138 | _(r''' |
|
135 | _(r''' | |
139 | Mercurial accepts several notations for identifying one or more |
|
136 | Mercurial accepts several notations for identifying one or more files at a | |
140 |
|
|
137 | time. | |
141 |
|
138 | |||
142 | By default, Mercurial treats filenames as shell-style extended |
|
139 | By default, Mercurial treats filenames as shell-style extended glob | |
143 |
|
|
140 | patterns. | |
144 |
|
141 | |||
145 | Alternate pattern notations must be specified explicitly. |
|
142 | Alternate pattern notations must be specified explicitly. | |
146 |
|
143 | |||
147 | To use a plain path name without any pattern matching, start it |
|
144 | To use a plain path name without any pattern matching, start it with | |
148 |
|
|
145 | "path:". These path names must completely match starting at the current | |
149 |
|
|
146 | repository root. | |
150 |
|
147 | |||
151 | To use an extended glob, start a name with "glob:". Globs are |
|
148 | To use an extended glob, start a name with "glob:". Globs are rooted at | |
152 |
|
|
149 | the current directory; a glob such as "*.c" will only match files in the | |
153 |
|
|
150 | current directory ending with ".c". | |
154 |
|
151 | |||
155 | The supported glob syntax extensions are "**" to match any string |
|
152 | The supported glob syntax extensions are "**" to match any string across | |
156 |
|
|
153 | path separators and "{a,b}" to mean "a or b". | |
157 |
|
154 | |||
158 | To use a Perl/Python regular expression, start a name with "re:". |
|
155 | To use a Perl/Python regular expression, start a name with "re:". Regexp | |
159 |
|
|
156 | pattern matching is anchored at the root of the repository. | |
160 |
|
157 | |||
161 | Plain examples: |
|
158 | Plain examples: | |
162 |
|
159 | |||
@@ -168,8 +165,8 b' helptable = (' | |||||
168 |
|
165 | |||
169 | glob:*.c any name ending in ".c" in the current directory |
|
166 | glob:*.c any name ending in ".c" in the current directory | |
170 | *.c any name ending in ".c" in the current directory |
|
167 | *.c any name ending in ".c" in the current directory | |
171 | **.c any name ending in ".c" in any subdirectory of the |
|
168 | **.c any name ending in ".c" in any subdirectory of the current | |
172 |
|
|
169 | directory including itself. | |
173 | foo/*.c any name ending in ".c" in the directory foo |
|
170 | foo/*.c any name ending in ".c" in the directory foo | |
174 | foo/**.c any name ending in ".c" in any subdirectory of foo |
|
171 | foo/**.c any name ending in ".c" in any subdirectory of foo | |
175 | including itself. |
|
172 | including itself. | |
@@ -183,11 +180,11 b' helptable = (' | |||||
183 | (['environment', 'env'], _('Environment Variables'), |
|
180 | (['environment', 'env'], _('Environment Variables'), | |
184 | _(r''' |
|
181 | _(r''' | |
185 | HG:: |
|
182 | HG:: | |
186 | Path to the 'hg' executable, automatically passed when running |
|
183 | Path to the 'hg' executable, automatically passed when running hooks, | |
187 |
|
|
184 | extensions or external tools. If unset or empty, this is the hg | |
188 |
|
|
185 | executable's name if it's frozen, or an executable named 'hg' (with | |
189 |
|
|
186 | %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on Windows) is | |
190 |
|
|
187 | searched. | |
191 |
|
188 | |||
192 | HGEDITOR:: |
|
189 | HGEDITOR:: | |
193 | This is the name of the editor to run when committing. See EDITOR. |
|
190 | This is the name of the editor to run when committing. See EDITOR. | |
@@ -195,39 +192,37 b' HGEDITOR::' | |||||
195 | (deprecated, use .hgrc) |
|
192 | (deprecated, use .hgrc) | |
196 |
|
193 | |||
197 | HGENCODING:: |
|
194 | HGENCODING:: | |
198 | This overrides the default locale setting detected by Mercurial. |
|
195 | This overrides the default locale setting detected by Mercurial. This | |
199 |
|
|
196 | setting is used to convert data including usernames, changeset | |
200 |
|
|
197 | descriptions, tag names, and branches. This setting can be overridden with | |
201 |
|
|
198 | the --encoding command-line option. | |
202 |
|
199 | |||
203 | HGENCODINGMODE:: |
|
200 | HGENCODINGMODE:: | |
204 | This sets Mercurial's behavior for handling unknown characters |
|
201 | This sets Mercurial's behavior for handling unknown characters while | |
205 |
|
|
202 | transcoding user input. The default is "strict", which causes Mercurial to | |
206 |
|
|
203 | abort if it can't map a character. Other settings include "replace", which | |
207 | settings include "replace", which replaces unknown characters, and |
|
204 | replaces unknown characters, and "ignore", which drops them. This setting | |
208 | "ignore", which drops them. This setting can be overridden with |
|
205 | can be overridden with the --encodingmode command-line option. | |
209 | the --encodingmode command-line option. |
|
|||
210 |
|
206 | |||
211 | HGMERGE:: |
|
207 | HGMERGE:: | |
212 | An executable to use for resolving merge conflicts. The program |
|
208 | An executable to use for resolving merge conflicts. The program will be | |
213 |
|
|
209 | executed with three arguments: local file, remote file, ancestor file. | |
214 | ancestor file. |
|
|||
215 |
|
210 | |||
216 | (deprecated, use .hgrc) |
|
211 | (deprecated, use .hgrc) | |
217 |
|
212 | |||
218 | HGRCPATH:: |
|
213 | HGRCPATH:: | |
219 | A list of files or directories to search for hgrc files. Item |
|
214 | A list of files or directories to search for hgrc files. Item separator is | |
220 |
|
|
215 | ":" on Unix, ";" on Windows. If HGRCPATH is not set, platform default | |
221 |
|
|
216 | search path is used. If empty, only the .hg/hgrc from the current | |
222 |
|
|
217 | repository is read. | |
223 |
|
218 | |||
224 | For each element in HGRCPATH: |
|
219 | For each element in HGRCPATH: | |
225 | * if it's a directory, all files ending with .rc are added |
|
220 | * if it's a directory, all files ending with .rc are added | |
226 | * otherwise, the file itself will be added |
|
221 | * otherwise, the file itself will be added | |
227 |
|
222 | |||
228 | HGUSER:: |
|
223 | HGUSER:: | |
229 | This is the string used as the author of a commit. If not set, |
|
224 | This is the string used as the author of a commit. If not set, available | |
230 |
|
|
225 | values will be considered in this order: | |
231 |
|
226 | |||
232 | * HGUSER (deprecated) |
|
227 | * HGUSER (deprecated) | |
233 | * hgrc files from the HGRCPATH |
|
228 | * hgrc files from the HGRCPATH | |
@@ -247,77 +242,71 b' VISUAL::' | |||||
247 | This is the name of the editor to use when committing. See EDITOR. |
|
242 | This is the name of the editor to use when committing. See EDITOR. | |
248 |
|
243 | |||
249 | EDITOR:: |
|
244 | EDITOR:: | |
250 | Sometimes Mercurial needs to open a text file in an editor for a |
|
245 | Sometimes Mercurial needs to open a text file in an editor for a user to | |
251 |
|
|
246 | modify, for example when writing commit messages. The editor it uses is | |
252 |
|
|
247 | determined by looking at the environment variables HGEDITOR, VISUAL and | |
253 | variables HGEDITOR, VISUAL and EDITOR, in that order. The first |
|
248 | EDITOR, in that order. The first non-empty one is chosen. If all of them | |
254 | non-empty one is chosen. If all of them are empty, the editor |
|
249 | are empty, the editor defaults to 'vi'. | |
255 | defaults to 'vi'. |
|
|||
256 |
|
250 | |||
257 | PYTHONPATH:: |
|
251 | PYTHONPATH:: | |
258 | This is used by Python to find imported modules and may need to be |
|
252 | This is used by Python to find imported modules and may need to be set | |
259 |
|
|
253 | appropriately if this Mercurial is not installed system-wide. | |
260 | ''')), |
|
254 | ''')), | |
261 |
|
255 | |||
262 | (['revs', 'revisions'], _('Specifying Single Revisions'), |
|
256 | (['revs', 'revisions'], _('Specifying Single Revisions'), | |
263 | _(r''' |
|
257 | _(r''' | |
264 | Mercurial supports several ways to specify individual revisions. |
|
258 | Mercurial supports several ways to specify individual revisions. | |
265 |
|
259 | |||
266 | A plain integer is treated as a revision number. Negative integers |
|
260 | A plain integer is treated as a revision number. Negative integers are | |
267 |
|
|
261 | treated as topological offsets from the tip, with -1 denoting the tip. As | |
268 |
|
|
262 | such, negative numbers are only useful if you've memorized your local tree | |
269 | memorized your local tree numbers and want to save typing a single |
|
263 | numbers and want to save typing a single digit. This editor suggests copy | |
270 | digit. This editor suggests copy and paste. |
|
264 | and paste. | |
271 |
|
265 | |||
272 | A 40-digit hexadecimal string is treated as a unique revision |
|
266 | A 40-digit hexadecimal string is treated as a unique revision identifier. | |
273 | identifier. |
|
|||
274 |
|
267 | |||
275 | A hexadecimal string less than 40 characters long is treated as a |
|
268 | A hexadecimal string less than 40 characters long is treated as a unique | |
276 |
|
|
269 | revision identifier, and referred to as a short-form identifier. A | |
277 |
|
|
270 | short-form identifier is only valid if it is the prefix of exactly one | |
278 |
|
|
271 | full-length identifier. | |
279 |
|
272 | |||
280 | Any other string is treated as a tag name, which is a symbolic |
|
273 | Any other string is treated as a tag name, which is a symbolic name | |
281 |
|
|
274 | associated with a revision identifier. Tag names may not contain the ":" | |
282 |
c |
|
275 | character. | |
283 |
|
276 | |||
284 | The reserved name "tip" is a special tag that always identifies |
|
277 | The reserved name "tip" is a special tag that always identifies the most | |
285 |
|
|
278 | recent revision. | |
286 |
|
279 | |||
287 | The reserved name "null" indicates the null revision. This is the |
|
280 | The reserved name "null" indicates the null revision. This is the revision | |
288 |
|
|
281 | of an empty repository, and the parent of revision 0. | |
289 |
|
282 | |||
290 | The reserved name "." indicates the working directory parent. If |
|
283 | The reserved name "." indicates the working directory parent. If no | |
291 |
|
|
284 | working directory is checked out, it is equivalent to null. If an | |
292 |
|
|
285 | uncommitted merge is in progress, "." is the revision of the first parent. | |
293 | first parent. |
|
|||
294 | ''')), |
|
286 | ''')), | |
295 |
|
287 | |||
296 | (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'), |
|
288 | (['mrevs', 'multirevs'], _('Specifying Multiple Revisions'), | |
297 | _(r''' |
|
289 | _(r''' | |
298 | When Mercurial accepts more than one revision, they may be |
|
290 | When Mercurial accepts more than one revision, they may be specified | |
299 |
|
|
291 | individually, or provided as a topologically continuous range, separated | |
300 |
|
|
292 | by the ":" character. | |
301 |
|
293 | |||
302 | The syntax of range notation is [BEGIN]:[END], where BEGIN and END |
|
294 | The syntax of range notation is [BEGIN]:[END], where BEGIN and END are | |
303 |
|
|
295 | revision identifiers. Both BEGIN and END are optional. If BEGIN is not | |
304 |
|
|
296 | specified, it defaults to revision number 0. If END is not specified, it | |
305 |
|
|
297 | defaults to the tip. The range ":" thus means "all revisions". | |
306 | "all revisions". |
|
|||
307 |
|
298 | |||
308 | If BEGIN is greater than END, revisions are treated in reverse |
|
299 | If BEGIN is greater than END, revisions are treated in reverse order. | |
309 | order. |
|
|||
310 |
|
300 | |||
311 | A range acts as a closed interval. This means that a range of 3:5 |
|
301 | A range acts as a closed interval. This means that a range of 3:5 gives 3, | |
312 |
|
|
302 | 4 and 5. Similarly, a range of 9:6 gives 9, 8, 7, and 6. | |
313 | ''')), |
|
303 | ''')), | |
314 |
|
304 | |||
315 | (['diffs'], _('Diff Formats'), |
|
305 | (['diffs'], _('Diff Formats'), | |
316 | _(r''' |
|
306 | _(r''' | |
317 | Mercurial's default format for showing changes between two |
|
307 | Mercurial's default format for showing changes between two versions of a | |
318 |
|
|
308 | file is compatible with the unified format of GNU diff, which can be used | |
319 |
|
|
309 | by GNU patch and many other standard tools. | |
320 | tools. |
|
|||
321 |
|
310 | |||
322 | While this standard format is often enough, it does not encode the |
|
311 | While this standard format is often enough, it does not encode the | |
323 | following information: |
|
312 | following information: | |
@@ -327,121 +316,116 b' PYTHONPATH::' | |||||
327 | - changes in binary files |
|
316 | - changes in binary files | |
328 | - creation or deletion of empty files |
|
317 | - creation or deletion of empty files | |
329 |
|
318 | |||
330 | Mercurial also supports the extended diff format from the git VCS |
|
319 | Mercurial also supports the extended diff format from the git VCS which | |
331 |
|
|
320 | addresses these limitations. The git diff format is not produced by | |
332 |
|
|
321 | default because a few widespread tools still do not understand this | |
333 | understand this format. |
|
322 | format. | |
334 |
|
323 | |||
335 | This means that when generating diffs from a Mercurial repository |
|
324 | This means that when generating diffs from a Mercurial repository (e.g. | |
336 |
|
|
325 | with "hg export"), you should be careful about things like file copies and | |
337 |
|
|
326 | renames or other things mentioned above, because when applying a standard | |
338 |
|
|
327 | diff to a different repository, this extra information is lost. | |
339 | extra information is lost. Mercurial's internal operations (like |
|
328 | Mercurial's internal operations (like push and pull) are not affected by | |
340 | push and pull) are not affected by this, because they use an |
|
329 | this, because they use an internal binary format for communicating | |
341 | internal binary format for communicating changes. |
|
330 | changes. | |
342 |
|
331 | |||
343 | To make Mercurial produce the git extended diff format, use the |
|
332 | To make Mercurial produce the git extended diff format, use the --git | |
344 |
|
|
333 | option available for many commands, or set 'git = True' in the [diff] | |
345 |
|
|
334 | section of your hgrc. You do not need to set this option when importing | |
346 |
|
|
335 | diffs in this format or using them in the mq extension. | |
347 | extension. |
|
|||
348 | ''')), |
|
336 | ''')), | |
349 | (['templating'], _('Template Usage'), |
|
337 | (['templating'], _('Template Usage'), | |
350 | _(r''' |
|
338 | _(r''' | |
351 | Mercurial allows you to customize output of commands through |
|
339 | Mercurial allows you to customize output of commands through templates. | |
352 |
|
|
340 | You can either pass in a template from the command line, via the | |
353 |
|
|
341 | --template option, or select an existing template-style (--style). | |
354 | template-style (--style). |
|
|||
355 |
|
342 | |||
356 | You can customize output for any "log-like" command: log, |
|
343 | You can customize output for any "log-like" command: log, outgoing, | |
357 |
|
|
344 | incoming, tip, parents, heads and glog. | |
358 |
|
345 | |||
359 | Three styles are packaged with Mercurial: default (the style used |
|
346 | Three styles are packaged with Mercurial: default (the style used when no | |
360 |
|
|
347 | explicit preference is passed), compact and changelog. Usage: | |
361 | Usage: |
|
|||
362 |
|
348 | |||
363 | $ hg log -r1 --style changelog |
|
349 | $ hg log -r1 --style changelog | |
364 |
|
350 | |||
365 | A template is a piece of text, with markup to invoke variable |
|
351 | A template is a piece of text, with markup to invoke variable expansion: | |
366 | expansion: |
|
|||
367 |
|
352 | |||
368 | $ hg log -r1 --template "{node}\n" |
|
353 | $ hg log -r1 --template "{node}\n" | |
369 | b56ce7b07c52de7d5fd79fb89701ea538af65746 |
|
354 | b56ce7b07c52de7d5fd79fb89701ea538af65746 | |
370 |
|
355 | |||
371 | Strings in curly braces are called keywords. The availability of |
|
356 | Strings in curly braces are called keywords. The availability of keywords | |
372 |
|
|
357 | depends on the exact context of the templater. These keywords are usually | |
373 |
|
|
358 | available for templating a log-like command: | |
374 |
|
359 | |||
375 | - author: String. The unmodified author of the changeset. |
|
360 | - author: String. The unmodified author of the changeset. | |
376 | - branches: String. The name of the branch on which the changeset |
|
361 | - branches: String. The name of the branch on which the changeset was | |
377 |
|
|
362 | committed. Will be empty if the branch name was default. | |
378 | - date: Date information. The date when the changeset was committed. |
|
363 | - date: Date information. The date when the changeset was committed. | |
379 | - desc: String. The text of the changeset description. |
|
364 | - desc: String. The text of the changeset description. | |
380 | - diffstat: String. Statistics of changes with the following |
|
365 | - diffstat: String. Statistics of changes with the following format: | |
381 |
|
|
366 | "modified files: +added/-removed lines" | |
382 | - files: List of strings. All files modified, added, or removed by |
|
367 | - files: List of strings. All files modified, added, or removed by this | |
383 |
|
|
368 | changeset. | |
384 | - file_adds: List of strings. Files added by this changeset. |
|
369 | - file_adds: List of strings. Files added by this changeset. | |
385 | - file_mods: List of strings. Files modified by this changeset. |
|
370 | - file_mods: List of strings. Files modified by this changeset. | |
386 | - file_dels: List of strings. Files removed by this changeset. |
|
371 | - file_dels: List of strings. Files removed by this changeset. | |
387 | - node: String. The changeset identification hash, as a |
|
372 | - node: String. The changeset identification hash, as a 40-character | |
388 |
|
|
373 | hexadecimal string. | |
389 | - parents: List of strings. The parents of the changeset. |
|
374 | - parents: List of strings. The parents of the changeset. | |
390 | - rev: Integer. The repository-local changeset revision number. |
|
375 | - rev: Integer. The repository-local changeset revision number. | |
391 | - tags: List of strings. Any tags associated with the changeset. |
|
376 | - tags: List of strings. Any tags associated with the changeset. | |
392 |
|
377 | |||
393 | The "date" keyword does not produce human-readable output. If you |
|
378 | The "date" keyword does not produce human-readable output. If you want to | |
394 |
|
|
379 | use a date in your output, you can use a filter to process it. Filters are | |
395 |
|
|
380 | functions which return a string based on the input variable. You can also | |
396 |
|
|
381 | use a chain of filters to get the desired output: | |
397 | output: |
|
|||
398 |
|
382 | |||
399 | $ hg tip --template "{date|isodate}\n" |
|
383 | $ hg tip --template "{date|isodate}\n" | |
400 | 2008-08-21 18:22 +0000 |
|
384 | 2008-08-21 18:22 +0000 | |
401 |
|
385 | |||
402 | List of filters: |
|
386 | List of filters: | |
403 |
|
387 | |||
404 | - addbreaks: Any text. Add an XHTML "<br />" tag before the end of |
|
388 | - addbreaks: Any text. Add an XHTML "<br />" tag before the end of every | |
405 |
|
|
389 | line except the last. | |
406 | - age: Date. Returns a human-readable date/time difference between |
|
390 | - age: Date. Returns a human-readable date/time difference between the | |
407 |
|
|
391 | given date/time and the current date/time. | |
408 | - basename: Any text. Treats the text as a path, and returns the |
|
392 | - basename: Any text. Treats the text as a path, and returns the last | |
409 |
|
|
393 | component of the path after splitting by the path separator | |
410 |
|
|
394 | (ignoring trailing separators). For example, "foo/bar/baz" becomes | |
411 |
|
|
395 | "baz" and "foo/bar//" becomes "bar". | |
412 | - stripdir: Treat the text as path and strip a directory level, if |
|
396 | - stripdir: Treat the text as path and strip a directory level, if | |
413 | possible. For example, "foo" and "foo/bar" becomes "foo". |
|
397 | possible. For example, "foo" and "foo/bar" becomes "foo". | |
414 | - date: Date. Returns a date in a Unix date format, including |
|
398 | - date: Date. Returns a date in a Unix date format, including the | |
415 |
t |
|
399 | timezone: "Mon Sep 04 15:13:13 2006 0700". | |
416 | - domain: Any text. Finds the first string that looks like an |
|
400 | - domain: Any text. Finds the first string that looks like an email | |
417 |
|
|
401 | address, and extracts just the domain component. Example: 'User | |
418 |
|
|
402 | <user@example.com>' becomes 'example.com'. | |
419 | - email: Any text. Extracts the first string that looks like an |
|
403 | - email: Any text. Extracts the first string that looks like an email | |
420 |
|
|
404 | address. Example: 'User <user@example.com>' becomes | |
421 | 'user@example.com'. |
|
405 | 'user@example.com'. | |
422 | - escape: Any text. Replaces the special XML/XHTML characters "&", |
|
406 | - escape: Any text. Replaces the special XML/XHTML characters "&", "<" and | |
423 |
|
|
407 | ">" with XML entities. | |
424 | - fill68: Any text. Wraps the text to fit in 68 columns. |
|
408 | - fill68: Any text. Wraps the text to fit in 68 columns. | |
425 | - fill76: Any text. Wraps the text to fit in 76 columns. |
|
409 | - fill76: Any text. Wraps the text to fit in 76 columns. | |
426 | - firstline: Any text. Returns the first line of text. |
|
410 | - firstline: Any text. Returns the first line of text. | |
427 | - nonempty: Any text. Returns '(none)' if the string is empty. |
|
411 | - nonempty: Any text. Returns '(none)' if the string is empty. | |
428 | - hgdate: Date. Returns the date as a pair of numbers: |
|
412 | - hgdate: Date. Returns the date as a pair of numbers: "1157407993 25200" | |
429 |
|
|
413 | (Unix timestamp, timezone offset). | |
430 | - isodate: Date. Returns the date in ISO 8601 format. |
|
414 | - isodate: Date. Returns the date in ISO 8601 format. | |
431 | - localdate: Date. Converts a date to local date. |
|
415 | - localdate: Date. Converts a date to local date. | |
432 | - obfuscate: Any text. Returns the input text rendered as a |
|
416 | - obfuscate: Any text. Returns the input text rendered as a sequence of | |
433 |
|
|
417 | XML entities. | |
434 | - person: Any text. Returns the text before an email address. |
|
418 | - person: Any text. Returns the text before an email address. | |
435 | - rfc822date: Date. Returns a date using the same format used |
|
419 | - rfc822date: Date. Returns a date using the same format used in email | |
436 |
|
|
420 | headers. | |
437 | - short: Changeset hash. Returns the short form of a changeset |
|
421 | - short: Changeset hash. Returns the short form of a changeset hash, i.e. | |
438 |
|
|
422 | a 12-byte hexadecimal string. | |
439 | - shortdate: Date. Returns a date like "2006-09-18". |
|
423 | - shortdate: Date. Returns a date like "2006-09-18". | |
440 | - strip: Any text. Strips all leading and trailing whitespace. |
|
424 | - strip: Any text. Strips all leading and trailing whitespace. | |
441 | - tabindent: Any text. Returns the text, with every line except |
|
425 | - tabindent: Any text. Returns the text, with every line except the first | |
442 |
|
|
426 | starting with a tab character. | |
443 | - urlescape: Any text. Escapes all "special" characters. For |
|
427 | - urlescape: Any text. Escapes all "special" characters. For example, "foo | |
444 |
|
|
428 | bar" becomes "foo%20bar". | |
445 | - user: Any text. Returns the user portion of an email address. |
|
429 | - user: Any text. Returns the user portion of an email address. | |
446 | ''')), |
|
430 | ''')), | |
447 |
|
431 | |||
@@ -455,57 +439,53 b' PYTHONPATH::' | |||||
455 | https://[user[:pass]@]host[:port]/[path][#revision] |
|
439 | https://[user[:pass]@]host[:port]/[path][#revision] | |
456 | ssh://[user[:pass]@]host[:port]/[path][#revision] |
|
440 | ssh://[user[:pass]@]host[:port]/[path][#revision] | |
457 |
|
441 | |||
458 | Paths in the local filesystem can either point to Mercurial |
|
442 | Paths in the local filesystem can either point to Mercurial repositories | |
459 |
|
|
443 | or to bundle files (as created by 'hg bundle' or 'hg incoming --bundle'). | |
460 | 'hg incoming --bundle'). |
|
|||
461 |
|
444 | |||
462 | An optional identifier after # indicates a particular branch, tag, |
|
445 | An optional identifier after # indicates a particular branch, tag, or | |
463 |
|
|
446 | changeset to use from the remote repository. See also 'hg help revisions'. | |
464 | revisions'. |
|
|||
465 |
|
447 | |||
466 | Some features, such as pushing to http:// and https:// URLs are |
|
448 | Some features, such as pushing to http:// and https:// URLs are only | |
467 |
|
|
449 | possible if the feature is explicitly enabled on the remote Mercurial | |
468 |
|
|
450 | server. | |
469 |
|
451 | |||
470 | Some notes about using SSH with Mercurial: |
|
452 | Some notes about using SSH with Mercurial: | |
471 | - SSH requires an accessible shell account on the destination |
|
453 | - SSH requires an accessible shell account on the destination machine and | |
472 |
|
|
454 | a copy of hg in the remote path or specified with as remotecmd. | |
473 | remotecmd. |
|
455 | - path is relative to the remote user's home directory by default. Use an | |
474 | - path is relative to the remote user's home directory by default. |
|
456 | extra slash at the start of a path to specify an absolute path: | |
475 | Use an extra slash at the start of a path to specify an absolute path: |
|
|||
476 | ssh://example.com//tmp/repository |
|
457 | ssh://example.com//tmp/repository | |
477 | - Mercurial doesn't use its own compression via SSH; the right |
|
458 | - Mercurial doesn't use its own compression via SSH; the right thing to do | |
478 |
|
|
459 | is to configure it in your ~/.ssh/config, e.g.: | |
479 | Host *.mylocalnetwork.example.com |
|
460 | Host *.mylocalnetwork.example.com | |
480 | Compression no |
|
461 | Compression no | |
481 | Host * |
|
462 | Host * | |
482 | Compression yes |
|
463 | Compression yes | |
483 | Alternatively specify "ssh -C" as your ssh command in your hgrc |
|
464 | Alternatively specify "ssh -C" as your ssh command in your hgrc or with | |
484 |
|
|
465 | the --ssh command line option. | |
485 |
|
466 | |||
486 | These URLs can all be stored in your hgrc with path aliases under |
|
467 | These URLs can all be stored in your hgrc with path aliases under the | |
487 |
|
|
468 | [paths] section like so: | |
488 | [paths] |
|
469 | [paths] | |
489 | alias1 = URL1 |
|
470 | alias1 = URL1 | |
490 | alias2 = URL2 |
|
471 | alias2 = URL2 | |
491 | ... |
|
472 | ... | |
492 |
|
473 | |||
493 | You can then use the alias for any command that uses a URL (for |
|
474 | You can then use the alias for any command that uses a URL (for example | |
494 |
|
|
475 | 'hg pull alias1' would pull from the 'alias1' path). | |
495 |
|
476 | |||
496 | Two path aliases are special because they are used as defaults |
|
477 | Two path aliases are special because they are used as defaults when you do | |
497 |
|
|
478 | not provide the URL to a command: | |
498 |
|
479 | |||
499 | default: |
|
480 | default: | |
500 | When you create a repository with hg clone, the clone command |
|
481 | When you create a repository with hg clone, the clone command saves the | |
501 |
|
|
482 | location of the source repository as the new repository's 'default' | |
502 |
|
|
483 | path. This is then used when you omit path from push- and pull-like | |
503 |
|
|
484 | commands (including incoming and outgoing). | |
504 | outgoing). |
|
|||
505 |
|
485 | |||
506 | default-push: |
|
486 | default-push: | |
507 | The push command will look for a path named 'default-push', and |
|
487 | The push command will look for a path named 'default-push', and prefer | |
508 |
|
|
488 | it over 'default' if both are defined. | |
509 | ''')), |
|
489 | ''')), | |
510 | (["extensions"], _("Using additional features"), extshelp), |
|
490 | (["extensions"], _("Using additional features"), extshelp), | |
511 | ) |
|
491 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now