Show More
This diff has been collapsed as it changes many lines, (588 lines changed) Show them Hide them | |||||
@@ -104,39 +104,42 b' alias::' | |||||
104 | Aliases allow you to define your own commands in terms of other |
|
104 | Aliases allow you to define your own commands in terms of other | |
105 | commands (or aliases), optionally including arguments. |
|
105 | commands (or aliases), optionally including arguments. | |
106 | + |
|
106 | + | |
|
107 | -- | |||
107 | Alias definitions consist of lines of the form: |
|
108 | Alias definitions consist of lines of the form: | |
108 | + |
|
109 | ||
109 | <alias> = <command> [<argument]... |
|
110 | <alias> = <command> [<argument]... | |
110 | + |
|
111 | ||
111 | For example, this definition: |
|
112 | For example, this definition: | |
112 | + |
|
113 | ||
113 | latest = log --limit 5 |
|
114 | latest = log --limit 5 | |
114 | + |
|
115 | ||
115 | creates a new command `latest` that shows only the five most recent |
|
116 | creates a new command `latest` that shows only the five most recent | |
116 | changesets. You can define subsequent aliases using earlier ones: |
|
117 | changesets. You can define subsequent aliases using earlier ones: | |
117 | + |
|
118 | ||
118 | stable5 = latest -b stable |
|
119 | stable5 = latest -b stable | |
119 | + |
|
120 | ||
120 | *Note*: It is possible to create aliases with the same names as |
|
121 | *Note*: It is possible to create aliases with the same names as | |
121 | existing commands, which will then override the original definitions. |
|
122 | existing commands, which will then override the original definitions. | |
122 | This is almost always a bad idea! |
|
123 | This is almost always a bad idea! | |
|
124 | -- | |||
123 |
|
125 | |||
124 | [[auth]] |
|
126 | [[auth]] | |
125 | auth:: |
|
127 | auth:: | |
126 |
|
|
128 | Authentication credentials for HTTP authentication. Each line has | |
127 |
|
|
129 | the following format: | |
128 |
|
130 | |||
129 | <name>.<argument> = <value> |
|
131 | <name>.<argument> = <value> | |
130 |
|
132 | + | ||
131 | where <name> is used to group arguments into authentication entries. |
|
133 | -- | |
132 | Example: |
|
134 | where <name> is used to group arguments into authentication entries. | |
|
135 | Example: | |||
133 |
|
136 | |||
134 | foo.prefix = hg.intevation.org/mercurial |
|
137 | foo.prefix = hg.intevation.org/mercurial | |
135 | foo.username = foo |
|
138 | foo.username = foo | |
136 | foo.password = bar |
|
139 | foo.password = bar | |
137 | foo.schemes = http https |
|
140 | foo.schemes = http https | |
138 |
|
141 | |||
139 |
|
|
142 | Supported arguments: | |
140 |
|
143 | |||
141 | prefix;; |
|
144 | prefix;; | |
142 | Either "`*`" or a URI prefix with or without the scheme part. The |
|
145 | Either "`*`" or a URI prefix with or without the scheme part. The | |
@@ -157,83 +160,88 b' auth::' | |||||
157 | static-http and static-https respectively, as well. |
|
160 | static-http and static-https respectively, as well. | |
158 | Default: https. |
|
161 | Default: https. | |
159 |
|
162 | |||
160 |
|
|
163 | If no suitable authentication entry is found, the user is prompted | |
161 |
|
|
164 | for credentials as usual if required by the remote. | |
|
165 | -- | |||
162 |
|
166 | |||
163 | [[decode]] |
|
167 | [[decode]] | |
164 | decode/encode:: |
|
168 | decode/encode:: | |
165 | Filters for transforming files on checkout/checkin. This would |
|
169 | Filters for transforming files on checkout/checkin. This would | |
166 | typically be used for newline processing or other |
|
170 | typically be used for newline processing or other | |
167 | localization/canonicalization of files. |
|
171 | localization/canonicalization of files. | |
|
172 | + | |||
|
173 | -- | |||
|
174 | Filters consist of a filter pattern followed by a filter command. | |||
|
175 | Filter patterns are globs by default, rooted at the repository root. | |||
|
176 | For example, to match any file ending in "`.txt`" in the root | |||
|
177 | directory only, use the pattern "`*.txt`". To match any file ending in | |||
|
178 | "`.c`" anywhere in the repository, use the pattern "`**.c`". | |||
168 |
|
179 | |||
169 | Filters consist of a filter pattern followed by a filter command. |
|
180 | The filter command can start with a specifier, either "pipe:" or | |
170 | Filter patterns are globs by default, rooted at the repository root. |
|
181 | "tempfile:". If no specifier is given, "pipe:" is used by default. | |
171 | For example, to match any file ending in "`.txt`" in the root |
|
|||
172 | directory only, use the pattern "`*.txt`". To match any file ending in |
|
|||
173 | "`.c`" anywhere in the repository, use the pattern "`**.c`". |
|
|||
174 |
|
||||
175 | The filter command can start with a specifier, either "pipe:" or |
|
|||
176 | "tempfile:". If no specifier is given, "pipe:" is used by default. |
|
|||
177 |
|
182 | |||
178 |
|
|
183 | A "pipe:" command must accept data on stdin and return the | |
179 |
|
|
184 | transformed data on stdout. | |
180 |
|
185 | |||
181 |
|
|
186 | Pipe example: | |
182 |
|
187 | |||
183 |
|
|
188 | [encode] | |
184 |
|
|
189 | # uncompress gzip files on checkin to improve delta compression | |
185 |
|
|
190 | # note: not necessarily a good idea, just an example | |
186 |
|
|
191 | *.gz = pipe: gunzip | |
187 |
|
192 | |||
188 |
|
|
193 | [decode] | |
189 |
|
|
194 | # recompress gzip files when writing them to the working dir (we | |
190 |
|
|
195 | # can safely omit "pipe:", because it's the default) | |
191 |
|
|
196 | *.gz = gzip | |
192 |
|
197 | |||
193 |
|
|
198 | A "tempfile:" command is a template. The string INFILE is replaced | |
194 |
|
|
199 | with the name of a temporary file that contains the data to be | |
195 |
|
|
200 | filtered by the command. The string OUTFILE is replaced with the | |
196 |
|
|
201 | name of an empty temporary file, where the filtered data must be | |
197 |
|
|
202 | written by the command. | |
198 |
|
203 | |||
199 |
|
|
204 | NOTE: the tempfile mechanism is recommended for Windows systems, | |
200 |
|
|
205 | where the standard shell I/O redirection operators often have | |
201 |
|
|
206 | strange effects and may corrupt the contents of your files. | |
202 |
|
207 | |||
203 |
|
|
208 | The most common usage is for LF <-> CRLF translation on Windows. For | |
204 |
|
|
209 | this, use the "smart" convertors which check for binary files: | |
205 |
|
210 | |||
206 |
|
|
211 | [extensions] | |
207 |
|
|
212 | hgext.win32text = | |
208 |
|
|
213 | [encode] | |
209 |
|
|
214 | ** = cleverencode: | |
210 |
|
|
215 | [decode] | |
211 |
|
|
216 | ** = cleverdecode: | |
212 |
|
217 | |||
213 |
|
|
218 | or if you only want to translate certain files: | |
214 |
|
219 | |||
215 |
|
|
220 | [extensions] | |
216 |
|
|
221 | hgext.win32text = | |
217 |
|
|
222 | [encode] | |
218 |
|
|
223 | **.txt = dumbencode: | |
219 |
|
|
224 | [decode] | |
220 |
|
|
225 | **.txt = dumbdecode: | |
|
226 | -- | |||
221 |
|
227 | |||
222 | [[defaults]] |
|
228 | [[defaults]] | |
223 | defaults:: |
|
229 | defaults:: | |
224 | Use the [defaults] section to define command defaults, i.e. the |
|
230 | Use the [defaults] section to define command defaults, i.e. the | |
225 | default options/arguments to pass to the specified commands. |
|
231 | default options/arguments to pass to the specified commands. | |
226 |
|
232 | + | ||
227 | The following example makes 'hg log' run in verbose mode, and 'hg |
|
233 | -- | |
228 | status' show only the modified files, by default. |
|
234 | The following example makes 'hg log' run in verbose mode, and 'hg | |
|
235 | status' show only the modified files, by default. | |||
229 |
|
236 | |||
230 |
|
|
237 | [defaults] | |
231 |
|
|
238 | log = -v | |
232 |
|
|
239 | status = -m | |
233 |
|
240 | |||
234 |
|
|
241 | The actual commands, instead of their aliases, must be used when | |
235 |
|
|
242 | defining command defaults. The command defaults will also be applied | |
236 |
|
|
243 | to the aliases of the commands defined. | |
|
244 | -- | |||
237 |
|
245 | |||
238 | [[diff]] |
|
246 | [[diff]] | |
239 | diff:: |
|
247 | diff:: | |
@@ -280,49 +288,53 b' email::' | |||||
280 | to which conversion from local encoding (`$HGENCODING`, |
|
288 | to which conversion from local encoding (`$HGENCODING`, | |
281 | `ui.fallbackencoding`) succeeds. If correct conversion fails, the |
|
289 | `ui.fallbackencoding`) succeeds. If correct conversion fails, the | |
282 | text in question is sent as is. Defaults to empty (explicit) list. |
|
290 | text in question is sent as is. Defaults to empty (explicit) list. | |
|
291 | + | |||
|
292 | -- | |||
|
293 | Order of outgoing email charsets: | |||
283 |
|
294 | |||
284 | Order of outgoing email charsets: |
|
295 | us-ascii always first, regardless of settings | |
285 |
|
296 | email.charsets in order given by user | ||
286 | us-ascii always first, regardless of settings |
|
297 | ui.fallbackencoding if not in email.charsets | |
287 | email.charsets in order given by user |
|
298 | $HGENCODING if not in email.charsets | |
288 | ui.fallbackencoding if not in email.charsets |
|
299 | utf-8 always last, regardless of settings | |
289 | $HGENCODING if not in email.charsets |
|
|||
290 | utf-8 always last, regardless of settings |
|
|||
291 |
|
300 | |||
292 |
|
|
301 | Email example: | |
293 |
|
302 | |||
294 |
|
|
303 | [email] | |
295 |
|
|
304 | from = Joseph User <joe.user@example.com> | |
296 |
|
|
305 | method = /usr/sbin/sendmail | |
297 |
|
|
306 | # charsets for western europeans | |
298 |
|
|
307 | # us-ascii, utf-8 omitted, as they are tried first and last | |
299 |
|
|
308 | charsets = iso-8859-1, iso-8859-15, windows-1252 | |
|
309 | -- | |||
300 |
|
310 | |||
301 | [[extensions]] |
|
311 | [[extensions]] | |
302 | extensions:: |
|
312 | extensions:: | |
303 | Mercurial has an extension mechanism for adding new features. To |
|
313 | Mercurial has an extension mechanism for adding new features. To | |
304 | enable an extension, create an entry for it in this section. |
|
314 | enable an extension, create an entry for it in this section. | |
|
315 | + | |||
|
316 | -- | |||
|
317 | If you know that the extension is already in Python's search path, | |||
|
318 | you can give the name of the module, followed by "=", with nothing | |||
|
319 | after the "=". | |||
305 |
|
320 | |||
306 | If you know that the extension is already in Python's search path, |
|
321 | Otherwise, give a name that you choose, followed by "=", followed by | |
307 | you can give the name of the module, followed by "=", with nothing |
|
322 | the path to the ".py" file (including the file name extension) that | |
308 | after the "=". |
|
323 | defines the extension. | |
309 |
|
||||
310 | Otherwise, give a name that you choose, followed by "=", followed by |
|
|||
311 | the path to the ".py" file (including the file name extension) that |
|
|||
312 | defines the extension. |
|
|||
313 |
|
324 | |||
314 |
|
|
325 | To explicitly disable an extension that is enabled in an hgrc of | |
315 |
|
|
326 | broader scope, prepend its path with '!', as in | |
316 |
|
|
327 | 'hgext.foo = !/ext/path' or 'hgext.foo = !' when path is not | |
317 |
|
|
328 | supplied. | |
|
329 | ||||
|
330 | Example for `~/.hgrc`: | |||
318 |
|
331 | |||
319 | Example for `~/.hgrc`: |
|
332 | [extensions] | |
320 |
|
333 | # (the mq extension will get loaded from mercurial's path) | ||
321 | [extensions] |
|
334 | hgext.mq = | |
322 |
|
|
335 | # (this extension will get loaded from the file specified) | |
323 | hgext.mq = |
|
336 | myfeature = ~/.hgext/myfeature.py | |
324 | # (this extension will get loaded from the file specified) |
|
337 | -- | |
325 | myfeature = ~/.hgext/myfeature.py |
|
|||
326 |
|
338 | |||
327 | [[format]] |
|
339 | [[format]] | |
328 | format:: |
|
340 | format:: | |
@@ -349,81 +361,83 b' merge-patterns::' | |||||
349 | patterns. Tools matched here will take precedence over the default |
|
361 | patterns. Tools matched here will take precedence over the default | |
350 | merge tool. Patterns are globs by default, rooted at the repository |
|
362 | merge tool. Patterns are globs by default, rooted at the repository | |
351 | root. |
|
363 | root. | |
352 |
|
364 | + | ||
353 |
|
|
365 | Example: | |
354 |
|
366 | + | ||
355 |
|
|
367 | [merge-patterns] | |
356 |
|
|
368 | **.c = kdiff3 | |
357 |
|
|
369 | **.jpg = myimgmerge | |
358 |
|
370 | |||
359 | [[merge-tools]] |
|
371 | [[merge-tools]] | |
360 | merge-tools:: |
|
372 | merge-tools:: | |
361 | This section configures external merge tools to use for file-level |
|
373 | This section configures external merge tools to use for file-level | |
362 | merges. |
|
374 | merges. | |
363 |
|
375 | + | ||
364 | Example `~/.hgrc`: |
|
376 | -- | |
|
377 | Example `~/.hgrc`: | |||
365 |
|
378 | |||
366 |
|
|
379 | [merge-tools] | |
367 |
|
|
380 | # Override stock tool location | |
368 |
|
|
381 | kdiff3.executable = ~/bin/kdiff3 | |
369 |
|
|
382 | # Specify command line | |
370 |
|
|
383 | kdiff3.args = $base $local $other -o $output | |
371 |
|
|
384 | # Give higher priority | |
372 |
|
|
385 | kdiff3.priority = 1 | |
373 |
|
386 | |||
374 |
|
|
387 | # Define new tool | |
375 |
|
|
388 | myHtmlTool.args = -m $local $other $base $output | |
376 |
|
|
389 | myHtmlTool.regkey = Software\FooSoftware\HtmlMerge | |
377 |
|
|
390 | myHtmlTool.priority = 1 | |
378 |
|
391 | |||
379 |
|
|
392 | Supported arguments: | |
380 |
|
393 | |||
381 |
|
|
394 | priority;; | |
382 |
|
|
395 | The priority in which to evaluate this tool. | |
383 |
|
|
396 | Default: 0. | |
384 |
|
|
397 | executable;; | |
385 |
|
|
398 | Either just the name of the executable or its pathname. | |
386 |
|
|
399 | Default: the tool name. | |
387 |
|
|
400 | args;; | |
388 |
|
|
401 | The arguments to pass to the tool executable. You can refer to the | |
389 |
|
|
402 | files being merged as well as the output file through these | |
390 |
|
|
403 | variables: `$base`, `$local`, `$other`, `$output`. | |
391 |
|
|
404 | Default: `$local $base $other` | |
392 |
|
|
405 | premerge;; | |
393 |
|
|
406 | Attempt to run internal non-interactive 3-way merge tool before | |
394 |
|
|
407 | launching external tool. | |
395 |
|
|
408 | Default: True | |
396 |
|
|
409 | binary;; | |
397 |
|
|
410 | This tool can merge binary files. Defaults to False, unless tool | |
398 |
|
|
411 | was selected by file pattern match. | |
399 |
|
|
412 | symlink;; | |
400 |
|
|
413 | This tool can merge symlinks. Defaults to False, even if tool was | |
401 |
|
|
414 | selected by file pattern match. | |
402 |
|
|
415 | checkconflicts;; | |
403 |
|
|
416 | Check whether there are conflicts even though the tool reported | |
404 |
|
|
417 | success. | |
405 |
|
|
418 | Default: False | |
406 |
|
|
419 | checkchanged;; | |
407 |
|
|
420 | Check whether outputs were written even though the tool reported | |
408 |
|
|
421 | success. | |
409 |
|
|
422 | Default: False | |
410 |
|
|
423 | fixeol;; | |
411 |
|
|
424 | Attempt to fix up EOL changes caused by the merge tool. | |
412 |
|
|
425 | Default: False | |
413 |
|
|
426 | gui;; | |
414 |
|
|
427 | This tool requires a graphical interface to run. Default: False | |
415 |
|
|
428 | regkey;; | |
416 |
|
|
429 | Windows registry key which describes install location of this | |
417 |
|
|
430 | tool. Mercurial will search for this key first under | |
418 |
|
|
431 | `HKEY_CURRENT_USER` and then under `HKEY_LOCAL_MACHINE`. | |
419 |
|
|
432 | Default: None | |
420 |
|
|
433 | regname;; | |
421 |
|
|
434 | Name of value to read from specified registry key. Defaults to the | |
422 |
|
|
435 | unnamed (default) value. | |
423 |
|
|
436 | regappend;; | |
424 |
|
|
437 | String to append to the value read from the registry, typically | |
425 |
|
|
438 | the executable name of the tool. | |
426 |
|
|
439 | Default: None | |
|
440 | -- | |||
427 |
|
441 | |||
428 | [[hooks]] |
|
442 | [[hooks]] | |
429 | hooks:: |
|
443 | hooks:: | |
@@ -432,123 +446,125 b' hooks::' | |||||
432 | hooks can be run for the same action by appending a suffix to the |
|
446 | hooks can be run for the same action by appending a suffix to the | |
433 | action. Overriding a site-wide hook can be done by changing its |
|
447 | action. Overriding a site-wide hook can be done by changing its | |
434 | value or setting it to an empty string. |
|
448 | value or setting it to an empty string. | |
435 |
|
449 | + | ||
436 | Example `.hg/hgrc`: |
|
450 | -- | |
|
451 | Example `.hg/hgrc`: | |||
437 |
|
452 | |||
438 |
|
|
453 | [hooks] | |
439 |
|
|
454 | # do not use the site-wide hook | |
440 |
|
|
455 | incoming = | |
441 |
|
|
456 | incoming.email = /my/email/hook | |
442 |
|
|
457 | incoming.autobuild = /my/build/hook | |
443 |
|
458 | |||
444 |
|
|
459 | Most hooks are run with environment variables set that give useful | |
445 |
|
|
460 | additional information. For each hook below, the environment | |
446 |
|
|
461 | variables it is passed are listed with names of the form "$HG_foo". | |
447 |
|
462 | |||
448 |
|
|
463 | changegroup;; | |
449 |
|
|
464 | Run after a changegroup has been added via push, pull or unbundle. | |
450 |
|
|
465 | ID of the first new changeset is in `$HG_NODE`. URL from which | |
451 |
|
|
466 | changes came is in `$HG_URL`. | |
452 |
|
|
467 | commit;; | |
453 |
|
|
468 | Run after a changeset has been created in the local repository. ID | |
454 |
|
|
469 | of the newly created changeset is in `$HG_NODE`. Parent changeset | |
455 |
|
|
470 | IDs are in `$HG_PARENT1` and `$HG_PARENT2`. | |
456 |
|
|
471 | incoming;; | |
457 |
|
|
472 | Run after a changeset has been pulled, pushed, or unbundled into | |
458 |
|
|
473 | the local repository. The ID of the newly arrived changeset is in | |
459 |
|
|
474 | `$HG_NODE`. URL that was source of changes came is in `$HG_URL`. | |
460 |
|
|
475 | outgoing;; | |
461 |
|
|
476 | Run after sending changes from local repository to another. ID of | |
462 |
|
|
477 | first changeset sent is in `$HG_NODE`. Source of operation is in | |
463 |
|
|
478 | `$HG_SOURCE`; see "preoutgoing" hook for description. | |
464 |
|
|
479 | post-<command>;; | |
465 |
|
|
480 | Run after successful invocations of the associated command. The | |
466 |
|
|
481 | contents of the command line are passed as `$HG_ARGS` and the result | |
467 |
|
|
482 | code in `$HG_RESULT`. Hook failure is ignored. | |
468 |
|
|
483 | pre-<command>;; | |
469 |
|
|
484 | Run before executing the associated command. The contents of the | |
470 |
|
|
485 | command line are passed as `$HG_ARGS`. If the hook returns failure, | |
471 |
|
|
486 | the command doesn't execute and Mercurial returns the failure | |
472 |
|
|
487 | code. | |
473 |
|
|
488 | prechangegroup;; | |
474 |
|
|
489 | Run before a changegroup is added via push, pull or unbundle. Exit | |
475 |
|
|
490 | status 0 allows the changegroup to proceed. Non-zero status will | |
476 |
|
|
491 | cause the push, pull or unbundle to fail. URL from which changes | |
477 |
|
|
492 | will come is in `$HG_URL`. | |
478 |
|
|
493 | precommit;; | |
479 |
|
|
494 | Run before starting a local commit. Exit status 0 allows the | |
480 |
|
|
495 | commit to proceed. Non-zero status will cause the commit to fail. | |
481 |
|
|
496 | Parent changeset IDs are in `$HG_PARENT1` and `$HG_PARENT2`. | |
482 |
|
|
497 | preoutgoing;; | |
483 |
|
|
498 | Run before collecting changes to send from the local repository to | |
484 |
|
|
499 | another. Non-zero status will cause failure. This lets you prevent | |
485 |
|
|
500 | pull over http or ssh. Also prevents against local pull, push | |
486 |
|
|
501 | (outbound) or bundle commands, but not effective, since you can | |
487 |
|
|
502 | just copy files instead then. Source of operation is in | |
488 |
|
|
503 | `$HG_SOURCE`. If "serve", operation is happening on behalf of remote | |
489 |
|
|
504 | ssh or http repository. If "push", "pull" or "bundle", operation | |
490 |
|
|
505 | is happening on behalf of repository on same system. | |
491 |
|
|
506 | pretag;; | |
492 |
|
|
507 | Run before creating a tag. Exit status 0 allows the tag to be | |
493 |
|
|
508 | created. Non-zero status will cause the tag to fail. ID of | |
494 |
|
|
509 | changeset to tag is in `$HG_NODE`. Name of tag is in `$HG_TAG`. Tag is | |
495 |
|
|
510 | local if `$HG_LOCAL=1`, in repo if `$HG_LOCAL=0`. | |
496 |
|
|
511 | pretxnchangegroup;; | |
497 |
|
|
512 | Run after a changegroup has been added via push, pull or unbundle, | |
498 |
|
|
513 | but before the transaction has been committed. Changegroup is | |
499 |
|
|
514 | visible to hook program. This lets you validate incoming changes | |
500 |
|
|
515 | before accepting them. Passed the ID of the first new changeset in | |
501 |
|
|
516 | `$HG_NODE`. Exit status 0 allows the transaction to commit. Non-zero | |
502 |
|
|
517 | status will cause the transaction to be rolled back and the push, | |
503 |
|
|
518 | pull or unbundle will fail. URL that was source of changes is in | |
504 |
|
|
519 | `$HG_URL`. | |
505 |
|
|
520 | pretxncommit;; | |
506 |
|
|
521 | Run after a changeset has been created but the transaction not yet | |
507 |
|
|
522 | committed. Changeset is visible to hook program. This lets you | |
508 |
|
|
523 | validate commit message and changes. Exit status 0 allows the | |
509 |
|
|
524 | commit to proceed. Non-zero status will cause the transaction to | |
510 |
|
|
525 | be rolled back. ID of changeset is in `$HG_NODE`. Parent changeset | |
511 |
|
|
526 | IDs are in `$HG_PARENT1` and `$HG_PARENT2`. | |
512 |
|
|
527 | preupdate;; | |
513 |
|
|
528 | Run before updating the working directory. Exit status 0 allows | |
514 |
|
|
529 | the update to proceed. Non-zero status will prevent the update. | |
515 |
|
|
530 | Changeset ID of first new parent is in `$HG_PARENT1`. If merge, ID | |
516 |
|
|
531 | of second new parent is in `$HG_PARENT2`. | |
517 |
|
|
532 | tag;; | |
518 |
|
|
533 | Run after a tag is created. ID of tagged changeset is in `$HG_NODE`. | |
519 |
|
|
534 | Name of tag is in `$HG_TAG`. Tag is local if `$HG_LOCAL=1`, in repo if | |
520 |
|
|
535 | `$HG_LOCAL=0`. | |
521 |
|
|
536 | update;; | |
522 |
|
|
537 | Run after updating the working directory. Changeset ID of first | |
523 |
|
|
538 | new parent is in `$HG_PARENT1`. If merge, ID of second new parent is | |
524 |
|
|
539 | in `$HG_PARENT2`. If the update succeeded, `$HG_ERROR=0`. If the | |
525 |
|
|
540 | update failed (e.g. because conflicts not resolved), `$HG_ERROR=1`. | |
526 |
|
541 | |||
527 |
|
|
542 | Note: it is generally better to use standard hooks rather than the | |
528 |
|
|
543 | generic pre- and post- command hooks as they are guaranteed to be | |
529 |
|
|
544 | called in the appropriate contexts for influencing transactions. | |
530 |
|
|
545 | Also, hooks like "commit" will be called in all contexts that | |
531 |
|
|
546 | generate a commit (e.g. tag) and not just the commit command. | |
532 |
|
547 | |||
533 |
|
|
548 | Note2: Environment variables with empty values may not be passed to | |
534 |
|
|
549 | hooks on platforms such as Windows. As an example, `$HG_PARENT2` will | |
535 |
|
|
550 | have an empty value under Unix-like platforms for non-merge | |
536 |
|
|
551 | changesets, while it will not be available at all under Windows. | |
537 |
|
552 | |||
538 |
|
|
553 | The syntax for Python hooks is as follows: | |
539 |
|
554 | |||
540 |
|
|
555 | hookname = python:modulename.submodule.callable | |
541 |
|
|
556 | hookname = python:/path/to/python/module.py:callable | |
542 |
|
557 | |||
543 |
|
|
558 | Python hooks are run within the Mercurial process. Each hook is | |
544 |
|
|
559 | called with at least three keyword arguments: a ui object (keyword | |
545 |
|
|
560 | "ui"), a repository object (keyword "repo"), and a "hooktype" | |
546 |
|
|
561 | keyword that tells what kind of hook is used. Arguments listed as | |
547 |
|
|
562 | environment variables above are passed as keyword arguments, with no | |
548 |
|
|
563 | "HG_" prefix, and names in lower case. | |
549 |
|
564 | |||
550 |
|
|
565 | If a Python hook returns a "true" value or raises an exception, this | |
551 |
|
|
566 | is treated as a failure. | |
|
567 | -- | |||
552 |
|
568 | |||
553 | [[http_proxy]] |
|
569 | [[http_proxy]] | |
554 | http_proxy:: |
|
570 | http_proxy:: | |
@@ -644,19 +660,23 b' trusted::' | |||||
644 | user or to a trusted group. The main exception is the web interface, |
|
660 | user or to a trusted group. The main exception is the web interface, | |
645 | which automatically uses some safe settings, since it's common to |
|
661 | which automatically uses some safe settings, since it's common to | |
646 | serve repositories from different users. |
|
662 | serve repositories from different users. | |
647 |
|
663 | + | ||
648 | This section specifies what users and groups are trusted. The |
|
664 | -- | |
649 | current user is always trusted. To trust everybody, list a user or a |
|
665 | This section specifies what users and groups are trusted. The | |
650 | group with name "*". |
|
666 | current user is always trusted. To trust everybody, list a user or a | |
|
667 | group with name "*". | |||
651 |
|
668 | |||
652 |
|
|
669 | users;; | |
653 |
|
|
670 | Comma-separated list of trusted users. | |
654 |
|
|
671 | groups;; | |
655 |
|
|
672 | Comma-separated list of trusted groups. | |
|
673 | -- | |||
656 |
|
674 | |||
657 | [[ui]] |
|
675 | [[ui]] | |
658 | ui:: |
|
676 | ui:: | |
659 | User interface controls. |
|
677 | User interface controls. | |
|
678 | + | |||
|
679 | -- | |||
660 | archivemeta;; |
|
680 | archivemeta;; | |
661 | Whether to include the .hg_archival.txt file containing metadata |
|
681 | Whether to include the .hg_archival.txt file containing metadata | |
662 | (hashes for the repository base and for tip) in archives created |
|
682 | (hashes for the repository base and for tip) in archives created | |
@@ -689,7 +709,7 b' ui::' | |||||
689 | merge;; |
|
709 | merge;; | |
690 | The conflict resolution program to use during a manual merge. |
|
710 | The conflict resolution program to use during a manual merge. | |
691 | There are some internal tools available: |
|
711 | There are some internal tools available: | |
692 |
|
712 | + | ||
693 | internal:local;; |
|
713 | internal:local;; | |
694 | keep the local version |
|
714 | keep the local version | |
695 | internal:other;; |
|
715 | internal:other;; | |
@@ -698,9 +718,9 b' ui::' | |||||
698 | use the internal non-interactive merge tool |
|
718 | use the internal non-interactive merge tool | |
699 | internal:fail;; |
|
719 | internal:fail;; | |
700 | fail to merge |
|
720 | fail to merge | |
701 |
|
721 | + | ||
702 |
|
|
722 | For more information on configuring merge tools see the | |
703 |
|
|
723 | merge-tools section. | |
704 |
|
724 | |||
705 | patch;; |
|
725 | patch;; | |
706 | command to use to apply patches. Look for 'gpatch' or 'patch' in |
|
726 | command to use to apply patches. Look for 'gpatch' or 'patch' in | |
@@ -737,7 +757,7 b' ui::' | |||||
737 | "username =" in the system hgrc). |
|
757 | "username =" in the system hgrc). | |
738 | verbose;; |
|
758 | verbose;; | |
739 | Increase the amount of output printed. True or False. Default is False. |
|
759 | Increase the amount of output printed. True or False. Default is False. | |
740 |
|
760 | -- | ||
741 |
|
761 | |||
742 | [[web]] |
|
762 | [[web]] | |
743 | web:: |
|
763 | web:: |
General Comments 0
You need to be logged in to leave comments.
Login now