##// END OF EJS Templates
Adjusted documentation for hgrc's "[smtp] host" for change in 9f745d3675d4.
Thomas Arendsen Hein -
r2853:619f1c65 default
parent child Browse files
Show More
@@ -1,478 +1,478 b''
1 1 HGRC(5)
2 2 =======
3 3 Bryan O'Sullivan <bos@serpentine.com>
4 4
5 5 NAME
6 6 ----
7 7 hgrc - configuration files for Mercurial
8 8
9 9 SYNOPSIS
10 10 --------
11 11
12 12 The Mercurial system uses a set of configuration files to control
13 13 aspects of its behaviour.
14 14
15 15 FILES
16 16 -----
17 17
18 18 Mercurial reads configuration data from several files, if they exist.
19 19 The names of these files depend on the system on which Mercurial is
20 20 installed.
21 21
22 22 (Unix) <install-root>/etc/mercurial/hgrc.d/*.rc::
23 23 (Unix) <install-root>/etc/mercurial/hgrc::
24 24 Per-installation configuration files, searched for in the
25 25 directory where Mercurial is installed. For example, if installed
26 26 in /shared/tools, Mercurial will look in
27 27 /shared/tools/etc/mercurial/hgrc. Options in these files apply to
28 28 all Mercurial commands executed by any user in any directory.
29 29
30 30 (Unix) /etc/mercurial/hgrc.d/*.rc::
31 31 (Unix) /etc/mercurial/hgrc::
32 32 (Windows) C:\Mercurial\Mercurial.ini::
33 33 Per-system configuration files, for the system on which Mercurial
34 34 is running. Options in these files apply to all Mercurial
35 35 commands executed by any user in any directory. Options in these
36 36 files override per-installation options.
37 37
38 38 (Unix) $HOME/.hgrc::
39 39 (Windows) C:\Documents and Settings\USERNAME\Mercurial.ini::
40 40 (Windows) $HOME\Mercurial.ini::
41 41 Per-user configuration file, for the user running Mercurial.
42 42 Options in this file apply to all Mercurial commands executed by
43 43 any user in any directory. Options in this file override
44 44 per-installation and per-system options.
45 45 On Windows system, one of these is chosen exclusively according
46 46 to definition of HOME environment variable.
47 47
48 48 (Unix, Windows) <repo>/.hg/hgrc::
49 49 Per-repository configuration options that only apply in a
50 50 particular repository. This file is not version-controlled, and
51 51 will not get transferred during a "clone" operation. Options in
52 52 this file override options in all other configuration files.
53 53
54 54 SYNTAX
55 55 ------
56 56
57 57 A configuration file consists of sections, led by a "[section]" header
58 58 and followed by "name: value" entries; "name=value" is also accepted.
59 59
60 60 [spam]
61 61 eggs=ham
62 62 green=
63 63 eggs
64 64
65 65 Each line contains one entry. If the lines that follow are indented,
66 66 they are treated as continuations of that entry.
67 67
68 68 Leading whitespace is removed from values. Empty lines are skipped.
69 69
70 70 The optional values can contain format strings which refer to other
71 71 values in the same section, or values in a special DEFAULT section.
72 72
73 73 Lines beginning with "#" or ";" are ignored and may be used to provide
74 74 comments.
75 75
76 76 SECTIONS
77 77 --------
78 78
79 79 This section describes the different sections that may appear in a
80 80 Mercurial "hgrc" file, the purpose of each section, its possible
81 81 keys, and their possible values.
82 82
83 83 decode/encode::
84 84 Filters for transforming files on checkout/checkin. This would
85 85 typically be used for newline processing or other
86 86 localization/canonicalization of files.
87 87
88 88 Filters consist of a filter pattern followed by a filter command.
89 89 Filter patterns are globs by default, rooted at the repository
90 90 root. For example, to match any file ending in ".txt" in the root
91 91 directory only, use the pattern "*.txt". To match any file ending
92 92 in ".c" anywhere in the repository, use the pattern "**.c".
93 93
94 94 The filter command can start with a specifier, either "pipe:" or
95 95 "tempfile:". If no specifier is given, "pipe:" is used by default.
96 96
97 97 A "pipe:" command must accept data on stdin and return the
98 98 transformed data on stdout.
99 99
100 100 Pipe example:
101 101
102 102 [encode]
103 103 # uncompress gzip files on checkin to improve delta compression
104 104 # note: not necessarily a good idea, just an example
105 105 *.gz = pipe: gunzip
106 106
107 107 [decode]
108 108 # recompress gzip files when writing them to the working dir (we
109 109 # can safely omit "pipe:", because it's the default)
110 110 *.gz = gzip
111 111
112 112 A "tempfile:" command is a template. The string INFILE is replaced
113 113 with the name of a temporary file that contains the data to be
114 114 filtered by the command. The string OUTFILE is replaced with the
115 115 name of an empty temporary file, where the filtered data must be
116 116 written by the command.
117 117
118 118 NOTE: the tempfile mechanism is recommended for Windows systems,
119 119 where the standard shell I/O redirection operators often have
120 120 strange effects. In particular, if you are doing line ending
121 121 conversion on Windows using the popular dos2unix and unix2dos
122 122 programs, you *must* use the tempfile mechanism, as using pipes will
123 123 corrupt the contents of your files.
124 124
125 125 Tempfile example:
126 126
127 127 [encode]
128 128 # convert files to unix line ending conventions on checkin
129 129 **.txt = tempfile: dos2unix -n INFILE OUTFILE
130 130
131 131 [decode]
132 132 # convert files to windows line ending conventions when writing
133 133 # them to the working dir
134 134 **.txt = tempfile: unix2dos -n INFILE OUTFILE
135 135
136 136 email::
137 137 Settings for extensions that send email messages.
138 138 from;;
139 139 Optional. Email address to use in "From" header and SMTP envelope
140 140 of outgoing messages.
141 141 to;;
142 142 Optional. Comma-separated list of recipients' email addresses.
143 143 cc;;
144 144 Optional. Comma-separated list of carbon copy recipients'
145 145 email addresses.
146 146 bcc;;
147 147 Optional. Comma-separated list of blind carbon copy
148 148 recipients' email addresses. Cannot be set interactively.
149 149 method;;
150 150 Optional. Method to use to send email messages. If value is
151 151 "smtp" (default), use SMTP (see section "[smtp]" for
152 152 configuration). Otherwise, use as name of program to run that
153 153 acts like sendmail (takes "-f" option for sender, list of
154 154 recipients on command line, message on stdin). Normally, setting
155 155 this to "sendmail" or "/usr/sbin/sendmail" is enough to use
156 156 sendmail to send messages.
157 157
158 158 Email example:
159 159
160 160 [email]
161 161 from = Joseph User <joe.user@example.com>
162 162 method = /usr/sbin/sendmail
163 163
164 164 extensions::
165 165 Mercurial has an extension mechanism for adding new features. To
166 166 enable an extension, create an entry for it in this section.
167 167
168 168 If you know that the extension is already in Python's search path,
169 169 you can give the name of the module, followed by "=", with nothing
170 170 after the "=".
171 171
172 172 Otherwise, give a name that you choose, followed by "=", followed by
173 173 the path to the ".py" file (including the file name extension) that
174 174 defines the extension.
175 175
176 176 Example for ~/.hgrc:
177 177
178 178 [extensions]
179 179 # (the mq extension will get loaded from mercurial's path)
180 180 hgext.mq =
181 181 # (this extension will get loaded from the file specified)
182 182 myfeature = ~/.hgext/myfeature.py
183 183
184 184 hooks::
185 185 Commands or Python functions that get automatically executed by
186 186 various actions such as starting or finishing a commit. Multiple
187 187 hooks can be run for the same action by appending a suffix to the
188 188 action. Overriding a site-wide hook can be done by changing its
189 189 value or setting it to an empty string.
190 190
191 191 Example .hg/hgrc:
192 192
193 193 [hooks]
194 194 # do not use the site-wide hook
195 195 incoming =
196 196 incoming.email = /my/email/hook
197 197 incoming.autobuild = /my/build/hook
198 198
199 199 Most hooks are run with environment variables set that give added
200 200 useful information. For each hook below, the environment variables
201 201 it is passed are listed with names of the form "$HG_foo".
202 202
203 203 changegroup;;
204 204 Run after a changegroup has been added via push, pull or
205 205 unbundle. ID of the first new changeset is in $HG_NODE. URL from
206 206 which changes came is in $HG_URL.
207 207 commit;;
208 208 Run after a changeset has been created in the local repository.
209 209 ID of the newly created changeset is in $HG_NODE. Parent
210 210 changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
211 211 incoming;;
212 212 Run after a changeset has been pulled, pushed, or unbundled into
213 213 the local repository. The ID of the newly arrived changeset is in
214 214 $HG_NODE. URL that was source of changes came is in $HG_URL.
215 215 outgoing;;
216 216 Run after sending changes from local repository to another. ID of
217 217 first changeset sent is in $HG_NODE. Source of operation is in
218 218 $HG_SOURCE; see "preoutgoing" hook for description.
219 219 prechangegroup;;
220 220 Run before a changegroup is added via push, pull or unbundle.
221 221 Exit status 0 allows the changegroup to proceed. Non-zero status
222 222 will cause the push, pull or unbundle to fail. URL from which
223 223 changes will come is in $HG_URL.
224 224 precommit;;
225 225 Run before starting a local commit. Exit status 0 allows the
226 226 commit to proceed. Non-zero status will cause the commit to fail.
227 227 Parent changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
228 228 preoutgoing;;
229 229 Run before computing changes to send from the local repository to
230 230 another. Non-zero status will cause failure. This lets you
231 231 prevent pull over http or ssh. Also prevents against local pull,
232 232 push (outbound) or bundle commands, but not effective, since you
233 233 can just copy files instead then. Source of operation is in
234 234 $HG_SOURCE. If "serve", operation is happening on behalf of
235 235 remote ssh or http repository. If "push", "pull" or "bundle",
236 236 operation is happening on behalf of repository on same system.
237 237 pretag;;
238 238 Run before creating a tag. Exit status 0 allows the tag to be
239 239 created. Non-zero status will cause the tag to fail. ID of
240 240 changeset to tag is in $HG_NODE. Name of tag is in $HG_TAG. Tag
241 241 is local if $HG_LOCAL=1, in repo if $HG_LOCAL=0.
242 242 pretxnchangegroup;;
243 243 Run after a changegroup has been added via push, pull or unbundle,
244 244 but before the transaction has been committed. Changegroup is
245 245 visible to hook program. This lets you validate incoming changes
246 246 before accepting them. Passed the ID of the first new changeset
247 247 in $HG_NODE. Exit status 0 allows the transaction to commit.
248 248 Non-zero status will cause the transaction to be rolled back and
249 249 the push, pull or unbundle will fail. URL that was source of
250 250 changes is in $HG_URL.
251 251 pretxncommit;;
252 252 Run after a changeset has been created but the transaction not yet
253 253 committed. Changeset is visible to hook program. This lets you
254 254 validate commit message and changes. Exit status 0 allows the
255 255 commit to proceed. Non-zero status will cause the transaction to
256 256 be rolled back. ID of changeset is in $HG_NODE. Parent changeset
257 257 IDs are in $HG_PARENT1 and $HG_PARENT2.
258 258 preupdate;;
259 259 Run before updating the working directory. Exit status 0 allows
260 260 the update to proceed. Non-zero status will prevent the update.
261 261 Changeset ID of first new parent is in $HG_PARENT1. If merge, ID
262 262 of second new parent is in $HG_PARENT2.
263 263 tag;;
264 264 Run after a tag is created. ID of tagged changeset is in
265 265 $HG_NODE. Name of tag is in $HG_TAG. Tag is local if
266 266 $HG_LOCAL=1, in repo if $HG_LOCAL=0.
267 267 update;;
268 268 Run after updating the working directory. Changeset ID of first
269 269 new parent is in $HG_PARENT1. If merge, ID of second new parent
270 270 is in $HG_PARENT2. If update succeeded, $HG_ERROR=0. If update
271 271 failed (e.g. because conflicts not resolved), $HG_ERROR=1.
272 272
273 273 Note: In earlier releases, the names of hook environment variables
274 274 did not have a "HG_" prefix. The old unprefixed names are no longer
275 275 provided in the environment.
276 276
277 277 The syntax for Python hooks is as follows:
278 278
279 279 hookname = python:modulename.submodule.callable
280 280
281 281 Python hooks are run within the Mercurial process. Each hook is
282 282 called with at least three keyword arguments: a ui object (keyword
283 283 "ui"), a repository object (keyword "repo"), and a "hooktype"
284 284 keyword that tells what kind of hook is used. Arguments listed as
285 285 environment variables above are passed as keyword arguments, with no
286 286 "HG_" prefix, and names in lower case.
287 287
288 288 A Python hook must return a "true" value to succeed. Returning a
289 289 "false" value or raising an exception is treated as failure of the
290 290 hook.
291 291
292 292 http_proxy::
293 293 Used to access web-based Mercurial repositories through a HTTP
294 294 proxy.
295 295 host;;
296 296 Host name and (optional) port of the proxy server, for example
297 297 "myproxy:8000".
298 298 no;;
299 299 Optional. Comma-separated list of host names that should bypass
300 300 the proxy.
301 301 passwd;;
302 302 Optional. Password to authenticate with at the proxy server.
303 303 user;;
304 304 Optional. User name to authenticate with at the proxy server.
305 305
306 306 smtp::
307 307 Configuration for extensions that need to send email messages.
308 308 host;;
309 Optional. Host name of mail server. Default: "mail".
309 Host name of mail server, e.g. "mail.example.com".
310 310 port;;
311 311 Optional. Port to connect to on mail server. Default: 25.
312 312 tls;;
313 313 Optional. Whether to connect to mail server using TLS. True or
314 314 False. Default: False.
315 315 username;;
316 316 Optional. User name to authenticate to SMTP server with.
317 317 If username is specified, password must also be specified.
318 318 Default: none.
319 319 password;;
320 320 Optional. Password to authenticate to SMTP server with.
321 321 If username is specified, password must also be specified.
322 322 Default: none.
323 323 local_hostname;;
324 324 Optional. It's the hostname that the sender can use to identify itself
325 325 to the MTA.
326 326
327 327 paths::
328 328 Assigns symbolic names to repositories. The left side is the
329 329 symbolic name, and the right gives the directory or URL that is the
330 330 location of the repository. Default paths can be declared by
331 331 setting the following entries.
332 332 default;;
333 333 Directory or URL to use when pulling if no source is specified.
334 334 Default is set to repository from which the current repository
335 335 was cloned.
336 336 default-push;;
337 337 Optional. Directory or URL to use when pushing if no destination
338 338 is specified.
339 339
340 340 server::
341 341 Controls generic server settings.
342 342 uncompressed;;
343 343 Whether to allow clients to clone a repo using the uncompressed
344 344 streaming protocol. This transfers about 40% more data than a
345 345 regular clone, but uses less memory and CPU on both server and
346 346 client. Over a LAN (100Mbps or better) or a very fast WAN, an
347 347 uncompressed streaming clone is a lot faster (~10x) than a regular
348 348 clone. Over most WAN connections (anything slower than about
349 349 6Mbps), uncompressed streaming is slower, because of the extra
350 350 data transfer overhead. Default is False.
351 351
352 352 ui::
353 353 User interface controls.
354 354 debug;;
355 355 Print debugging information. True or False. Default is False.
356 356 editor;;
357 357 The editor to use during a commit. Default is $EDITOR or "vi".
358 358 ignore;;
359 359 A file to read per-user ignore patterns from. This file should be in
360 360 the same format as a repository-wide .hgignore file. This option
361 361 supports hook syntax, so if you want to specify multiple ignore
362 362 files, you can do so by setting something like
363 363 "ignore.other = ~/.hgignore2". For details of the ignore file
364 364 format, see the hgignore(5) man page.
365 365 interactive;;
366 366 Allow to prompt the user. True or False. Default is True.
367 367 logtemplate;;
368 368 Template string for commands that print changesets.
369 369 style;;
370 370 Name of style to use for command output.
371 371 merge;;
372 372 The conflict resolution program to use during a manual merge.
373 373 Default is "hgmerge".
374 374 quiet;;
375 375 Reduce the amount of output printed. True or False. Default is False.
376 376 remotecmd;;
377 377 remote command to use for clone/push/pull operations. Default is 'hg'.
378 378 ssh;;
379 379 command to use for SSH connections. Default is 'ssh'.
380 380 timeout;;
381 381 The timeout used when a lock is held (in seconds), a negative value
382 382 means no timeout. Default is 600.
383 383 username;;
384 384 The committer of a changeset created when running "commit".
385 385 Typically a person's name and email address, e.g. "Fred Widget
386 386 <fred@example.com>". Default is $EMAIL or username@hostname, unless
387 387 username is set to an empty string, which enforces specifying the
388 388 username manually.
389 389 verbose;;
390 390 Increase the amount of output printed. True or False. Default is False.
391 391
392 392
393 393 web::
394 394 Web interface configuration.
395 395 accesslog;;
396 396 Where to output the access log. Default is stdout.
397 397 address;;
398 398 Interface address to bind to. Default is all.
399 399 allow_archive;;
400 400 List of archive format (bz2, gz, zip) allowed for downloading.
401 401 Default is empty.
402 402 allowbz2;;
403 403 (DEPRECATED) Whether to allow .tar.bz2 downloading of repo revisions.
404 404 Default is false.
405 405 allowgz;;
406 406 (DEPRECATED) Whether to allow .tar.gz downloading of repo revisions.
407 407 Default is false.
408 408 allowpull;;
409 409 Whether to allow pulling from the repository. Default is true.
410 410 allow_push;;
411 411 Whether to allow pushing to the repository. If empty or not set,
412 412 push is not allowed. If the special value "*", any remote user
413 413 can push, including unauthenticated users. Otherwise, the remote
414 414 user must have been authenticated, and the authenticated user name
415 415 must be present in this list (separated by whitespace or ",").
416 416 The contents of the allow_push list are examined after the
417 417 deny_push list.
418 418 allowzip;;
419 419 (DEPRECATED) Whether to allow .zip downloading of repo revisions.
420 420 Default is false. This feature creates temporary files.
421 421 baseurl;;
422 422 Base URL to use when publishing URLs in other locations, so
423 423 third-party tools like email notification hooks can construct URLs.
424 424 Example: "http://hgserver/repos/"
425 425 contact;;
426 426 Name or email address of the person in charge of the repository.
427 427 Default is "unknown".
428 428 deny_push;;
429 429 Whether to deny pushing to the repository. If empty or not set,
430 430 push is not denied. If the special value "*", all remote users
431 431 are denied push. Otherwise, unauthenticated users are all denied,
432 432 and any authenticated user name present in this list (separated by
433 433 whitespace or ",") is also denied. The contents of the deny_push
434 434 list are examined before the allow_push list.
435 435 description;;
436 436 Textual description of the repository's purpose or contents.
437 437 Default is "unknown".
438 438 errorlog;;
439 439 Where to output the error log. Default is stderr.
440 440 ipv6;;
441 441 Whether to use IPv6. Default is false.
442 442 name;;
443 443 Repository name to use in the web interface. Default is current
444 444 working directory.
445 445 maxchanges;;
446 446 Maximum number of changes to list on the changelog. Default is 10.
447 447 maxfiles;;
448 448 Maximum number of files to list per changeset. Default is 10.
449 449 port;;
450 450 Port to listen on. Default is 8000.
451 451 push_ssl;;
452 452 Whether to require that inbound pushes be transported over SSL to
453 453 prevent password sniffing. Default is true.
454 454 stripes;;
455 455 How many lines a "zebra stripe" should span in multiline output.
456 456 Default is 1; set to 0 to disable.
457 457 style;;
458 458 Which template map style to use.
459 459 templates;;
460 460 Where to find the HTML templates. Default is install path.
461 461
462 462
463 463 AUTHOR
464 464 ------
465 465 Bryan O'Sullivan <bos@serpentine.com>.
466 466
467 467 Mercurial was written by Matt Mackall <mpm@selenic.com>.
468 468
469 469 SEE ALSO
470 470 --------
471 471 hg(1), hgignore(5)
472 472
473 473 COPYING
474 474 -------
475 475 This manual page is copyright 2005 Bryan O'Sullivan.
476 476 Mercurial is copyright 2005, 2006 Matt Mackall.
477 477 Free use of this software is granted under the terms of the GNU General
478 478 Public License (GPL).
General Comments 0
You need to be logged in to leave comments. Login now