##// END OF EJS Templates
hgrc.5: mention lists as well
Martin Geisler -
r10980:30ae8174 stable
parent child Browse files
Show More
@@ -1,998 +1,998 b''
1 ======
1 ======
2 hgrc
2 hgrc
3 ======
3 ======
4
4
5 ---------------------------------
5 ---------------------------------
6 configuration files for Mercurial
6 configuration files for Mercurial
7 ---------------------------------
7 ---------------------------------
8
8
9 :Author: Bryan O'Sullivan <bos@serpentine.com>
9 :Author: Bryan O'Sullivan <bos@serpentine.com>
10 :Organization: Mercurial
10 :Organization: Mercurial
11 :Manual section: 5
11 :Manual section: 5
12 :Manual group: Mercurial Manual
12 :Manual group: Mercurial Manual
13
13
14 .. contents::
14 .. contents::
15 :backlinks: top
15 :backlinks: top
16 :class: htmlonly
16 :class: htmlonly
17
17
18
18
19 Synopsis
19 Synopsis
20 --------
20 --------
21
21
22 The Mercurial system uses a set of configuration files to control
22 The Mercurial system uses a set of configuration files to control
23 aspects of its behavior.
23 aspects of its behavior.
24
24
25 Files
25 Files
26 -----
26 -----
27
27
28 Mercurial reads configuration data from several files, if they exist.
28 Mercurial reads configuration data from several files, if they exist.
29 The names of these files depend on the system on which Mercurial is
29 The names of these files depend on the system on which Mercurial is
30 installed. ``*.rc`` files from a single directory are read in
30 installed. ``*.rc`` files from a single directory are read in
31 alphabetical order, later ones overriding earlier ones. Where multiple
31 alphabetical order, later ones overriding earlier ones. Where multiple
32 paths are given below, settings from earlier paths override later
32 paths are given below, settings from earlier paths override later
33 ones.
33 ones.
34
34
35 | (Unix, Windows) ``<repo>/.hg/hgrc``
35 | (Unix, Windows) ``<repo>/.hg/hgrc``
36
36
37 Per-repository configuration options that only apply in a
37 Per-repository configuration options that only apply in a
38 particular repository. This file is not version-controlled, and
38 particular repository. This file is not version-controlled, and
39 will not get transferred during a "clone" operation. Options in
39 will not get transferred during a "clone" operation. Options in
40 this file override options in all other configuration files. On
40 this file override options in all other configuration files. On
41 Unix, most of this file will be ignored if it doesn't belong to a
41 Unix, most of this file will be ignored if it doesn't belong to a
42 trusted user or to a trusted group. See the documentation for the
42 trusted user or to a trusted group. See the documentation for the
43 trusted_ section below for more details.
43 trusted_ section below for more details.
44
44
45 | (Unix) ``$HOME/.hgrc``
45 | (Unix) ``$HOME/.hgrc``
46 | (Windows) ``%USERPROFILE%\.hgrc``
46 | (Windows) ``%USERPROFILE%\.hgrc``
47 | (Windows) ``%USERPROFILE%\Mercurial.ini``
47 | (Windows) ``%USERPROFILE%\Mercurial.ini``
48 | (Windows) ``%HOME%\.hgrc``
48 | (Windows) ``%HOME%\.hgrc``
49 | (Windows) ``%HOME%\Mercurial.ini``
49 | (Windows) ``%HOME%\Mercurial.ini``
50
50
51 Per-user configuration file(s), for the user running Mercurial. On
51 Per-user configuration file(s), for the user running Mercurial. On
52 Windows 9x, ``%HOME%`` is replaced by ``%APPDATA%``. Options in these
52 Windows 9x, ``%HOME%`` is replaced by ``%APPDATA%``. Options in these
53 files apply to all Mercurial commands executed by this user in any
53 files apply to all Mercurial commands executed by this user in any
54 directory. Options in these files override per-system and per-installation
54 directory. Options in these files override per-system and per-installation
55 options.
55 options.
56
56
57 | (Unix) ``/etc/mercurial/hgrc``
57 | (Unix) ``/etc/mercurial/hgrc``
58 | (Unix) ``/etc/mercurial/hgrc.d/*.rc``
58 | (Unix) ``/etc/mercurial/hgrc.d/*.rc``
59
59
60 Per-system configuration files, for the system on which Mercurial
60 Per-system configuration files, for the system on which Mercurial
61 is running. Options in these files apply to all Mercurial commands
61 is running. Options in these files apply to all Mercurial commands
62 executed by any user in any directory. Options in these files
62 executed by any user in any directory. Options in these files
63 override per-installation options.
63 override per-installation options.
64
64
65 | (Unix) ``<install-root>/etc/mercurial/hgrc``
65 | (Unix) ``<install-root>/etc/mercurial/hgrc``
66 | (Unix) ``<install-root>/etc/mercurial/hgrc.d/*.rc``
66 | (Unix) ``<install-root>/etc/mercurial/hgrc.d/*.rc``
67
67
68 Per-installation configuration files, searched for in the
68 Per-installation configuration files, searched for in the
69 directory where Mercurial is installed. ``<install-root>`` is the
69 directory where Mercurial is installed. ``<install-root>`` is the
70 parent directory of the **hg** executable (or symlink) being run. For
70 parent directory of the **hg** executable (or symlink) being run. For
71 example, if installed in ``/shared/tools/bin/hg``, Mercurial will look
71 example, if installed in ``/shared/tools/bin/hg``, Mercurial will look
72 in ``/shared/tools/etc/mercurial/hgrc``. Options in these files apply
72 in ``/shared/tools/etc/mercurial/hgrc``. Options in these files apply
73 to all Mercurial commands executed by any user in any directory.
73 to all Mercurial commands executed by any user in any directory.
74
74
75 | (Windows) ``<install-dir>\Mercurial.ini``
75 | (Windows) ``<install-dir>\Mercurial.ini``
76 | (Windows) ``<install-dir>\hgrc.d\*.rc``
76 | (Windows) ``<install-dir>\hgrc.d\*.rc``
77 | (Windows) ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial``
77 | (Windows) ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial``
78
78
79 Per-installation/system configuration files, for the system on
79 Per-installation/system configuration files, for the system on
80 which Mercurial is running. Options in these files apply to all
80 which Mercurial is running. Options in these files apply to all
81 Mercurial commands executed by any user in any directory. Registry
81 Mercurial commands executed by any user in any directory. Registry
82 keys contain PATH-like strings, every part of which must reference
82 keys contain PATH-like strings, every part of which must reference
83 a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will
83 a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will
84 be read. Mercurial checks each of these locations in the specified
84 be read. Mercurial checks each of these locations in the specified
85 order until one or more configuration files are detected. If the
85 order until one or more configuration files are detected. If the
86 pywin32 extensions are not installed, Mercurial will only look for
86 pywin32 extensions are not installed, Mercurial will only look for
87 site-wide configuration in ``C:\Mercurial\Mercurial.ini``.
87 site-wide configuration in ``C:\Mercurial\Mercurial.ini``.
88
88
89 Syntax
89 Syntax
90 ------
90 ------
91
91
92 A configuration file consists of sections, led by a ``[section]`` header
92 A configuration file consists of sections, led by a ``[section]`` header
93 and followed by ``name = value`` entries::
93 and followed by ``name = value`` entries::
94
94
95 [spam]
95 [spam]
96 eggs=ham
96 eggs=ham
97 green=
97 green=
98 eggs
98 eggs
99
99
100 Each line contains one entry. If the lines that follow are indented,
100 Each line contains one entry. If the lines that follow are indented,
101 they are treated as continuations of that entry. Leading whitespace is
101 they are treated as continuations of that entry. Leading whitespace is
102 removed from values. Empty lines are skipped. Lines beginning with
102 removed from values. Empty lines are skipped. Lines beginning with
103 ``#`` or ``;`` are ignored and may be used to provide comments.
103 ``#`` or ``;`` are ignored and may be used to provide comments.
104
104
105 A line of the form ``%include file`` will include ``file`` into the
105 A line of the form ``%include file`` will include ``file`` into the
106 current configuration file. The inclusion is recursive, which means
106 current configuration file. The inclusion is recursive, which means
107 that included files can include other files. Filenames are relative to
107 that included files can include other files. Filenames are relative to
108 the configuration file in which the ``%include`` directive is found.
108 the configuration file in which the ``%include`` directive is found.
109
109
110 A line with ``%unset name`` will remove ``name`` from the current
110 A line with ``%unset name`` will remove ``name`` from the current
111 section, if it has been set previously.
111 section, if it has been set previously.
112
112
113 The values are either free-form text strings or Boolean values.
113 The values are either free-form text strings, lists of text strings,
114 Boolean values can be set to true using any of "1", "yes", "true", or
114 or Boolean values. Lists are split on whitespace and commas. Boolean
115 "on" and to false using "0", "no", "false", or "off" (all case
115 values can be set to true using any of "1", "yes", "true", or "on" and
116 insensitive).
116 to false using "0", "no", "false", or "off" (all case insensitive).
117
117
118
118
119 Sections
119 Sections
120 --------
120 --------
121
121
122 This section describes the different sections that may appear in a
122 This section describes the different sections that may appear in a
123 Mercurial "hgrc" file, the purpose of each section, its possible keys,
123 Mercurial "hgrc" file, the purpose of each section, its possible keys,
124 and their possible values.
124 and their possible values.
125
125
126 ``alias``
126 ``alias``
127 """""""""
127 """""""""
128 Defines command aliases.
128 Defines command aliases.
129 Aliases allow you to define your own commands in terms of other
129 Aliases allow you to define your own commands in terms of other
130 commands (or aliases), optionally including arguments.
130 commands (or aliases), optionally including arguments.
131
131
132 Alias definitions consist of lines of the form::
132 Alias definitions consist of lines of the form::
133
133
134 <alias> = <command> [<argument]...
134 <alias> = <command> [<argument]...
135
135
136 For example, this definition::
136 For example, this definition::
137
137
138 latest = log --limit 5
138 latest = log --limit 5
139
139
140 creates a new command ``latest`` that shows only the five most recent
140 creates a new command ``latest`` that shows only the five most recent
141 changesets. You can define subsequent aliases using earlier ones::
141 changesets. You can define subsequent aliases using earlier ones::
142
142
143 stable5 = latest -b stable
143 stable5 = latest -b stable
144
144
145 .. note:: It is possible to create aliases with the same names as
145 .. note:: It is possible to create aliases with the same names as
146 existing commands, which will then override the original
146 existing commands, which will then override the original
147 definitions. This is almost always a bad idea!
147 definitions. This is almost always a bad idea!
148
148
149
149
150 ``auth``
150 ``auth``
151 """"""""
151 """"""""
152 Authentication credentials for HTTP authentication. Each line has
152 Authentication credentials for HTTP authentication. Each line has
153 the following format::
153 the following format::
154
154
155 <name>.<argument> = <value>
155 <name>.<argument> = <value>
156
156
157 where ``<name>`` is used to group arguments into authentication
157 where ``<name>`` is used to group arguments into authentication
158 entries. Example::
158 entries. Example::
159
159
160 foo.prefix = hg.intevation.org/mercurial
160 foo.prefix = hg.intevation.org/mercurial
161 foo.username = foo
161 foo.username = foo
162 foo.password = bar
162 foo.password = bar
163 foo.schemes = http https
163 foo.schemes = http https
164
164
165 bar.prefix = secure.example.org
165 bar.prefix = secure.example.org
166 bar.key = path/to/file.key
166 bar.key = path/to/file.key
167 bar.cert = path/to/file.cert
167 bar.cert = path/to/file.cert
168 bar.schemes = https
168 bar.schemes = https
169
169
170 Supported arguments:
170 Supported arguments:
171
171
172 ``prefix``
172 ``prefix``
173 Either ``*`` or a URI prefix with or without the scheme part.
173 Either ``*`` or a URI prefix with or without the scheme part.
174 The authentication entry with the longest matching prefix is used
174 The authentication entry with the longest matching prefix is used
175 (where ``*`` matches everything and counts as a match of length
175 (where ``*`` matches everything and counts as a match of length
176 1). If the prefix doesn't include a scheme, the match is performed
176 1). If the prefix doesn't include a scheme, the match is performed
177 against the URI with its scheme stripped as well, and the schemes
177 against the URI with its scheme stripped as well, and the schemes
178 argument, q.v., is then subsequently consulted.
178 argument, q.v., is then subsequently consulted.
179 ``username``
179 ``username``
180 Optional. Username to authenticate with. If not given, and the
180 Optional. Username to authenticate with. If not given, and the
181 remote site requires basic or digest authentication, the user
181 remote site requires basic or digest authentication, the user
182 will be prompted for it.
182 will be prompted for it.
183 ``password``
183 ``password``
184 Optional. Password to authenticate with. If not given, and the
184 Optional. Password to authenticate with. If not given, and the
185 remote site requires basic or digest authentication, the user
185 remote site requires basic or digest authentication, the user
186 will be prompted for it.
186 will be prompted for it.
187 ``key``
187 ``key``
188 Optional. PEM encoded client certificate key file.
188 Optional. PEM encoded client certificate key file.
189 ``cert``
189 ``cert``
190 Optional. PEM encoded client certificate chain file.
190 Optional. PEM encoded client certificate chain file.
191 ``schemes``
191 ``schemes``
192 Optional. Space separated list of URI schemes to use this
192 Optional. Space separated list of URI schemes to use this
193 authentication entry with. Only used if the prefix doesn't include
193 authentication entry with. Only used if the prefix doesn't include
194 a scheme. Supported schemes are http and https. They will match
194 a scheme. Supported schemes are http and https. They will match
195 static-http and static-https respectively, as well.
195 static-http and static-https respectively, as well.
196 Default: https.
196 Default: https.
197
197
198 If no suitable authentication entry is found, the user is prompted
198 If no suitable authentication entry is found, the user is prompted
199 for credentials as usual if required by the remote.
199 for credentials as usual if required by the remote.
200
200
201
201
202 ``decode/encode``
202 ``decode/encode``
203 """""""""""""""""
203 """""""""""""""""
204 Filters for transforming files on checkout/checkin. This would
204 Filters for transforming files on checkout/checkin. This would
205 typically be used for newline processing or other
205 typically be used for newline processing or other
206 localization/canonicalization of files.
206 localization/canonicalization of files.
207
207
208 Filters consist of a filter pattern followed by a filter command.
208 Filters consist of a filter pattern followed by a filter command.
209 Filter patterns are globs by default, rooted at the repository root.
209 Filter patterns are globs by default, rooted at the repository root.
210 For example, to match any file ending in ``.txt`` in the root
210 For example, to match any file ending in ``.txt`` in the root
211 directory only, use the pattern ``*.txt``. To match any file ending
211 directory only, use the pattern ``*.txt``. To match any file ending
212 in ``.c`` anywhere in the repository, use the pattern ``**.c``.
212 in ``.c`` anywhere in the repository, use the pattern ``**.c``.
213 For each file only the first matching filter applies.
213 For each file only the first matching filter applies.
214
214
215 The filter command can start with a specifier, either ``pipe:`` or
215 The filter command can start with a specifier, either ``pipe:`` or
216 ``tempfile:``. If no specifier is given, ``pipe:`` is used by default.
216 ``tempfile:``. If no specifier is given, ``pipe:`` is used by default.
217
217
218 A ``pipe:`` command must accept data on stdin and return the transformed
218 A ``pipe:`` command must accept data on stdin and return the transformed
219 data on stdout.
219 data on stdout.
220
220
221 Pipe example::
221 Pipe example::
222
222
223 [encode]
223 [encode]
224 # uncompress gzip files on checkin to improve delta compression
224 # uncompress gzip files on checkin to improve delta compression
225 # note: not necessarily a good idea, just an example
225 # note: not necessarily a good idea, just an example
226 *.gz = pipe: gunzip
226 *.gz = pipe: gunzip
227
227
228 [decode]
228 [decode]
229 # recompress gzip files when writing them to the working dir (we
229 # recompress gzip files when writing them to the working dir (we
230 # can safely omit "pipe:", because it's the default)
230 # can safely omit "pipe:", because it's the default)
231 *.gz = gzip
231 *.gz = gzip
232
232
233 A ``tempfile:`` command is a template. The string ``INFILE`` is replaced
233 A ``tempfile:`` command is a template. The string ``INFILE`` is replaced
234 with the name of a temporary file that contains the data to be
234 with the name of a temporary file that contains the data to be
235 filtered by the command. The string ``OUTFILE`` is replaced with the name
235 filtered by the command. The string ``OUTFILE`` is replaced with the name
236 of an empty temporary file, where the filtered data must be written by
236 of an empty temporary file, where the filtered data must be written by
237 the command.
237 the command.
238
238
239 .. note:: The tempfile mechanism is recommended for Windows systems,
239 .. note:: The tempfile mechanism is recommended for Windows systems,
240 where the standard shell I/O redirection operators often have
240 where the standard shell I/O redirection operators often have
241 strange effects and may corrupt the contents of your files.
241 strange effects and may corrupt the contents of your files.
242
242
243 The most common usage is for LF <-> CRLF translation on Windows. For
243 The most common usage is for LF <-> CRLF translation on Windows. For
244 this, use the "smart" converters which check for binary files::
244 this, use the "smart" converters which check for binary files::
245
245
246 [extensions]
246 [extensions]
247 hgext.win32text =
247 hgext.win32text =
248 [encode]
248 [encode]
249 ** = cleverencode:
249 ** = cleverencode:
250 [decode]
250 [decode]
251 ** = cleverdecode:
251 ** = cleverdecode:
252
252
253 or if you only want to translate certain files::
253 or if you only want to translate certain files::
254
254
255 [extensions]
255 [extensions]
256 hgext.win32text =
256 hgext.win32text =
257 [encode]
257 [encode]
258 **.txt = dumbencode:
258 **.txt = dumbencode:
259 [decode]
259 [decode]
260 **.txt = dumbdecode:
260 **.txt = dumbdecode:
261
261
262
262
263 ``defaults``
263 ``defaults``
264 """"""""""""
264 """"""""""""
265
265
266 (defaults are deprecated. Don't use them. Use aliases instead)
266 (defaults are deprecated. Don't use them. Use aliases instead)
267
267
268 Use the ``[defaults]`` section to define command defaults, i.e. the
268 Use the ``[defaults]`` section to define command defaults, i.e. the
269 default options/arguments to pass to the specified commands.
269 default options/arguments to pass to the specified commands.
270
270
271 The following example makes ``hg log`` run in verbose mode, and ``hg
271 The following example makes ``hg log`` run in verbose mode, and ``hg
272 status`` show only the modified files, by default::
272 status`` show only the modified files, by default::
273
273
274 [defaults]
274 [defaults]
275 log = -v
275 log = -v
276 status = -m
276 status = -m
277
277
278 The actual commands, instead of their aliases, must be used when
278 The actual commands, instead of their aliases, must be used when
279 defining command defaults. The command defaults will also be applied
279 defining command defaults. The command defaults will also be applied
280 to the aliases of the commands defined.
280 to the aliases of the commands defined.
281
281
282
282
283 ``diff``
283 ``diff``
284 """"""""
284 """"""""
285
285
286 Settings used when displaying diffs. They are all Boolean and
286 Settings used when displaying diffs. They are all Boolean and
287 defaults to False.
287 defaults to False.
288
288
289 ``git``
289 ``git``
290 Use git extended diff format.
290 Use git extended diff format.
291 ``nodates``
291 ``nodates``
292 Don't include dates in diff headers.
292 Don't include dates in diff headers.
293 ``showfunc``
293 ``showfunc``
294 Show which function each change is in.
294 Show which function each change is in.
295 ``ignorews``
295 ``ignorews``
296 Ignore white space when comparing lines.
296 Ignore white space when comparing lines.
297 ``ignorewsamount``
297 ``ignorewsamount``
298 Ignore changes in the amount of white space.
298 Ignore changes in the amount of white space.
299 ``ignoreblanklines``
299 ``ignoreblanklines``
300 Ignore changes whose lines are all blank.
300 Ignore changes whose lines are all blank.
301
301
302 ``email``
302 ``email``
303 """""""""
303 """""""""
304 Settings for extensions that send email messages.
304 Settings for extensions that send email messages.
305
305
306 ``from``
306 ``from``
307 Optional. Email address to use in "From" header and SMTP envelope
307 Optional. Email address to use in "From" header and SMTP envelope
308 of outgoing messages.
308 of outgoing messages.
309 ``to``
309 ``to``
310 Optional. Comma-separated list of recipients' email addresses.
310 Optional. Comma-separated list of recipients' email addresses.
311 ``cc``
311 ``cc``
312 Optional. Comma-separated list of carbon copy recipients'
312 Optional. Comma-separated list of carbon copy recipients'
313 email addresses.
313 email addresses.
314 ``bcc``
314 ``bcc``
315 Optional. Comma-separated list of blind carbon copy recipients'
315 Optional. Comma-separated list of blind carbon copy recipients'
316 email addresses.
316 email addresses.
317 ``method``
317 ``method``
318 Optional. Method to use to send email messages. If value is ``smtp``
318 Optional. Method to use to send email messages. If value is ``smtp``
319 (default), use SMTP (see the SMTP_ section for configuration).
319 (default), use SMTP (see the SMTP_ section for configuration).
320 Otherwise, use as name of program to run that acts like sendmail
320 Otherwise, use as name of program to run that acts like sendmail
321 (takes ``-f`` option for sender, list of recipients on command line,
321 (takes ``-f`` option for sender, list of recipients on command line,
322 message on stdin). Normally, setting this to ``sendmail`` or
322 message on stdin). Normally, setting this to ``sendmail`` or
323 ``/usr/sbin/sendmail`` is enough to use sendmail to send messages.
323 ``/usr/sbin/sendmail`` is enough to use sendmail to send messages.
324 ``charsets``
324 ``charsets``
325 Optional. Comma-separated list of character sets considered
325 Optional. Comma-separated list of character sets considered
326 convenient for recipients. Addresses, headers, and parts not
326 convenient for recipients. Addresses, headers, and parts not
327 containing patches of outgoing messages will be encoded in the
327 containing patches of outgoing messages will be encoded in the
328 first character set to which conversion from local encoding
328 first character set to which conversion from local encoding
329 (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct
329 (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct
330 conversion fails, the text in question is sent as is. Defaults to
330 conversion fails, the text in question is sent as is. Defaults to
331 empty (explicit) list.
331 empty (explicit) list.
332
332
333 Order of outgoing email character sets:
333 Order of outgoing email character sets:
334
334
335 1. ``us-ascii``: always first, regardless of settings
335 1. ``us-ascii``: always first, regardless of settings
336 2. ``email.charsets``: in order given by user
336 2. ``email.charsets``: in order given by user
337 3. ``ui.fallbackencoding``: if not in email.charsets
337 3. ``ui.fallbackencoding``: if not in email.charsets
338 4. ``$HGENCODING``: if not in email.charsets
338 4. ``$HGENCODING``: if not in email.charsets
339 5. ``utf-8``: always last, regardless of settings
339 5. ``utf-8``: always last, regardless of settings
340
340
341 Email example::
341 Email example::
342
342
343 [email]
343 [email]
344 from = Joseph User <joe.user@example.com>
344 from = Joseph User <joe.user@example.com>
345 method = /usr/sbin/sendmail
345 method = /usr/sbin/sendmail
346 # charsets for western Europeans
346 # charsets for western Europeans
347 # us-ascii, utf-8 omitted, as they are tried first and last
347 # us-ascii, utf-8 omitted, as they are tried first and last
348 charsets = iso-8859-1, iso-8859-15, windows-1252
348 charsets = iso-8859-1, iso-8859-15, windows-1252
349
349
350
350
351 ``extensions``
351 ``extensions``
352 """"""""""""""
352 """"""""""""""
353
353
354 Mercurial has an extension mechanism for adding new features. To
354 Mercurial has an extension mechanism for adding new features. To
355 enable an extension, create an entry for it in this section.
355 enable an extension, create an entry for it in this section.
356
356
357 If you know that the extension is already in Python's search path,
357 If you know that the extension is already in Python's search path,
358 you can give the name of the module, followed by ``=``, with nothing
358 you can give the name of the module, followed by ``=``, with nothing
359 after the ``=``.
359 after the ``=``.
360
360
361 Otherwise, give a name that you choose, followed by ``=``, followed by
361 Otherwise, give a name that you choose, followed by ``=``, followed by
362 the path to the ``.py`` file (including the file name extension) that
362 the path to the ``.py`` file (including the file name extension) that
363 defines the extension.
363 defines the extension.
364
364
365 To explicitly disable an extension that is enabled in an hgrc of
365 To explicitly disable an extension that is enabled in an hgrc of
366 broader scope, prepend its path with ``!``, as in
366 broader scope, prepend its path with ``!``, as in
367 ``hgext.foo = !/ext/path`` or ``hgext.foo = !`` when path is not
367 ``hgext.foo = !/ext/path`` or ``hgext.foo = !`` when path is not
368 supplied.
368 supplied.
369
369
370 Example for ``~/.hgrc``::
370 Example for ``~/.hgrc``::
371
371
372 [extensions]
372 [extensions]
373 # (the mq extension will get loaded from Mercurial's path)
373 # (the mq extension will get loaded from Mercurial's path)
374 hgext.mq =
374 hgext.mq =
375 # (this extension will get loaded from the file specified)
375 # (this extension will get loaded from the file specified)
376 myfeature = ~/.hgext/myfeature.py
376 myfeature = ~/.hgext/myfeature.py
377
377
378
378
379 ``format``
379 ``format``
380 """"""""""
380 """"""""""
381
381
382 ``usestore``
382 ``usestore``
383 Enable or disable the "store" repository format which improves
383 Enable or disable the "store" repository format which improves
384 compatibility with systems that fold case or otherwise mangle
384 compatibility with systems that fold case or otherwise mangle
385 filenames. Enabled by default. Disabling this option will allow
385 filenames. Enabled by default. Disabling this option will allow
386 you to store longer filenames in some situations at the expense of
386 you to store longer filenames in some situations at the expense of
387 compatibility and ensures that the on-disk format of newly created
387 compatibility and ensures that the on-disk format of newly created
388 repositories will be compatible with Mercurial before version 0.9.4.
388 repositories will be compatible with Mercurial before version 0.9.4.
389
389
390 ``usefncache``
390 ``usefncache``
391 Enable or disable the "fncache" repository format which enhances
391 Enable or disable the "fncache" repository format which enhances
392 the "store" repository format (which has to be enabled to use
392 the "store" repository format (which has to be enabled to use
393 fncache) to allow longer filenames and avoids using Windows
393 fncache) to allow longer filenames and avoids using Windows
394 reserved names, e.g. "nul". Enabled by default. Disabling this
394 reserved names, e.g. "nul". Enabled by default. Disabling this
395 option ensures that the on-disk format of newly created
395 option ensures that the on-disk format of newly created
396 repositories will be compatible with Mercurial before version 1.1.
396 repositories will be compatible with Mercurial before version 1.1.
397
397
398 ``merge-patterns``
398 ``merge-patterns``
399 """"""""""""""""""
399 """"""""""""""""""
400
400
401 This section specifies merge tools to associate with particular file
401 This section specifies merge tools to associate with particular file
402 patterns. Tools matched here will take precedence over the default
402 patterns. Tools matched here will take precedence over the default
403 merge tool. Patterns are globs by default, rooted at the repository
403 merge tool. Patterns are globs by default, rooted at the repository
404 root.
404 root.
405
405
406 Example::
406 Example::
407
407
408 [merge-patterns]
408 [merge-patterns]
409 **.c = kdiff3
409 **.c = kdiff3
410 **.jpg = myimgmerge
410 **.jpg = myimgmerge
411
411
412 ``merge-tools``
412 ``merge-tools``
413 """""""""""""""
413 """""""""""""""
414
414
415 This section configures external merge tools to use for file-level
415 This section configures external merge tools to use for file-level
416 merges.
416 merges.
417
417
418 Example ``~/.hgrc``::
418 Example ``~/.hgrc``::
419
419
420 [merge-tools]
420 [merge-tools]
421 # Override stock tool location
421 # Override stock tool location
422 kdiff3.executable = ~/bin/kdiff3
422 kdiff3.executable = ~/bin/kdiff3
423 # Specify command line
423 # Specify command line
424 kdiff3.args = $base $local $other -o $output
424 kdiff3.args = $base $local $other -o $output
425 # Give higher priority
425 # Give higher priority
426 kdiff3.priority = 1
426 kdiff3.priority = 1
427
427
428 # Define new tool
428 # Define new tool
429 myHtmlTool.args = -m $local $other $base $output
429 myHtmlTool.args = -m $local $other $base $output
430 myHtmlTool.regkey = Software\FooSoftware\HtmlMerge
430 myHtmlTool.regkey = Software\FooSoftware\HtmlMerge
431 myHtmlTool.priority = 1
431 myHtmlTool.priority = 1
432
432
433 Supported arguments:
433 Supported arguments:
434
434
435 ``priority``
435 ``priority``
436 The priority in which to evaluate this tool.
436 The priority in which to evaluate this tool.
437 Default: 0.
437 Default: 0.
438 ``executable``
438 ``executable``
439 Either just the name of the executable or its pathname. On Windows,
439 Either just the name of the executable or its pathname. On Windows,
440 the path can use environment variables with ${ProgramFiles} syntax.
440 the path can use environment variables with ${ProgramFiles} syntax.
441 Default: the tool name.
441 Default: the tool name.
442 ``args``
442 ``args``
443 The arguments to pass to the tool executable. You can refer to the
443 The arguments to pass to the tool executable. You can refer to the
444 files being merged as well as the output file through these
444 files being merged as well as the output file through these
445 variables: ``$base``, ``$local``, ``$other``, ``$output``.
445 variables: ``$base``, ``$local``, ``$other``, ``$output``.
446 Default: ``$local $base $other``
446 Default: ``$local $base $other``
447 ``premerge``
447 ``premerge``
448 Attempt to run internal non-interactive 3-way merge tool before
448 Attempt to run internal non-interactive 3-way merge tool before
449 launching external tool.
449 launching external tool.
450 Default: True
450 Default: True
451 ``binary``
451 ``binary``
452 This tool can merge binary files. Defaults to False, unless tool
452 This tool can merge binary files. Defaults to False, unless tool
453 was selected by file pattern match.
453 was selected by file pattern match.
454 ``symlink``
454 ``symlink``
455 This tool can merge symlinks. Defaults to False, even if tool was
455 This tool can merge symlinks. Defaults to False, even if tool was
456 selected by file pattern match.
456 selected by file pattern match.
457 ``checkconflicts``
457 ``checkconflicts``
458 Check whether there are conflicts even though the tool reported
458 Check whether there are conflicts even though the tool reported
459 success.
459 success.
460 Default: False
460 Default: False
461 ``checkchanged``
461 ``checkchanged``
462 Check whether outputs were written even though the tool reported
462 Check whether outputs were written even though the tool reported
463 success.
463 success.
464 Default: False
464 Default: False
465 ``fixeol``
465 ``fixeol``
466 Attempt to fix up EOL changes caused by the merge tool.
466 Attempt to fix up EOL changes caused by the merge tool.
467 Default: False
467 Default: False
468 ``gui``
468 ``gui``
469 This tool requires a graphical interface to run. Default: False
469 This tool requires a graphical interface to run. Default: False
470 ``regkey``
470 ``regkey``
471 Windows registry key which describes install location of this
471 Windows registry key which describes install location of this
472 tool. Mercurial will search for this key first under
472 tool. Mercurial will search for this key first under
473 ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``.
473 ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``.
474 Default: None
474 Default: None
475 ``regname``
475 ``regname``
476 Name of value to read from specified registry key. Defaults to the
476 Name of value to read from specified registry key. Defaults to the
477 unnamed (default) value.
477 unnamed (default) value.
478 ``regappend``
478 ``regappend``
479 String to append to the value read from the registry, typically
479 String to append to the value read from the registry, typically
480 the executable name of the tool.
480 the executable name of the tool.
481 Default: None
481 Default: None
482
482
483
483
484 ``hooks``
484 ``hooks``
485 """""""""
485 """""""""
486 Commands or Python functions that get automatically executed by
486 Commands or Python functions that get automatically executed by
487 various actions such as starting or finishing a commit. Multiple
487 various actions such as starting or finishing a commit. Multiple
488 hooks can be run for the same action by appending a suffix to the
488 hooks can be run for the same action by appending a suffix to the
489 action. Overriding a site-wide hook can be done by changing its
489 action. Overriding a site-wide hook can be done by changing its
490 value or setting it to an empty string.
490 value or setting it to an empty string.
491
491
492 Example ``.hg/hgrc``::
492 Example ``.hg/hgrc``::
493
493
494 [hooks]
494 [hooks]
495 # update working directory after adding changesets
495 # update working directory after adding changesets
496 changegroup.update = hg update
496 changegroup.update = hg update
497 # do not use the site-wide hook
497 # do not use the site-wide hook
498 incoming =
498 incoming =
499 incoming.email = /my/email/hook
499 incoming.email = /my/email/hook
500 incoming.autobuild = /my/build/hook
500 incoming.autobuild = /my/build/hook
501
501
502 Most hooks are run with environment variables set that give useful
502 Most hooks are run with environment variables set that give useful
503 additional information. For each hook below, the environment
503 additional information. For each hook below, the environment
504 variables it is passed are listed with names of the form ``$HG_foo``.
504 variables it is passed are listed with names of the form ``$HG_foo``.
505
505
506 ``changegroup``
506 ``changegroup``
507 Run after a changegroup has been added via push, pull or unbundle.
507 Run after a changegroup has been added via push, pull or unbundle.
508 ID of the first new changeset is in ``$HG_NODE``. URL from which
508 ID of the first new changeset is in ``$HG_NODE``. URL from which
509 changes came is in ``$HG_URL``.
509 changes came is in ``$HG_URL``.
510 ``commit``
510 ``commit``
511 Run after a changeset has been created in the local repository. ID
511 Run after a changeset has been created in the local repository. ID
512 of the newly created changeset is in ``$HG_NODE``. Parent changeset
512 of the newly created changeset is in ``$HG_NODE``. Parent changeset
513 IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
513 IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
514 ``incoming``
514 ``incoming``
515 Run after a changeset has been pulled, pushed, or unbundled into
515 Run after a changeset has been pulled, pushed, or unbundled into
516 the local repository. The ID of the newly arrived changeset is in
516 the local repository. The ID of the newly arrived changeset is in
517 ``$HG_NODE``. URL that was source of changes came is in ``$HG_URL``.
517 ``$HG_NODE``. URL that was source of changes came is in ``$HG_URL``.
518 ``outgoing``
518 ``outgoing``
519 Run after sending changes from local repository to another. ID of
519 Run after sending changes from local repository to another. ID of
520 first changeset sent is in ``$HG_NODE``. Source of operation is in
520 first changeset sent is in ``$HG_NODE``. Source of operation is in
521 ``$HG_SOURCE``; see "preoutgoing" hook for description.
521 ``$HG_SOURCE``; see "preoutgoing" hook for description.
522 ``post-<command>``
522 ``post-<command>``
523 Run after successful invocations of the associated command. The
523 Run after successful invocations of the associated command. The
524 contents of the command line are passed as ``$HG_ARGS`` and the result
524 contents of the command line are passed as ``$HG_ARGS`` and the result
525 code in ``$HG_RESULT``. Hook failure is ignored.
525 code in ``$HG_RESULT``. Hook failure is ignored.
526 ``pre-<command>``
526 ``pre-<command>``
527 Run before executing the associated command. The contents of the
527 Run before executing the associated command. The contents of the
528 command line are passed as ``$HG_ARGS``. If the hook returns failure,
528 command line are passed as ``$HG_ARGS``. If the hook returns failure,
529 the command doesn't execute and Mercurial returns the failure
529 the command doesn't execute and Mercurial returns the failure
530 code.
530 code.
531 ``prechangegroup``
531 ``prechangegroup``
532 Run before a changegroup is added via push, pull or unbundle. Exit
532 Run before a changegroup is added via push, pull or unbundle. Exit
533 status 0 allows the changegroup to proceed. Non-zero status will
533 status 0 allows the changegroup to proceed. Non-zero status will
534 cause the push, pull or unbundle to fail. URL from which changes
534 cause the push, pull or unbundle to fail. URL from which changes
535 will come is in ``$HG_URL``.
535 will come is in ``$HG_URL``.
536 ``precommit``
536 ``precommit``
537 Run before starting a local commit. Exit status 0 allows the
537 Run before starting a local commit. Exit status 0 allows the
538 commit to proceed. Non-zero status will cause the commit to fail.
538 commit to proceed. Non-zero status will cause the commit to fail.
539 Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
539 Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
540 ``preoutgoing``
540 ``preoutgoing``
541 Run before collecting changes to send from the local repository to
541 Run before collecting changes to send from the local repository to
542 another. Non-zero status will cause failure. This lets you prevent
542 another. Non-zero status will cause failure. This lets you prevent
543 pull over HTTP or SSH. Also prevents against local pull, push
543 pull over HTTP or SSH. Also prevents against local pull, push
544 (outbound) or bundle commands, but not effective, since you can
544 (outbound) or bundle commands, but not effective, since you can
545 just copy files instead then. Source of operation is in
545 just copy files instead then. Source of operation is in
546 ``$HG_SOURCE``. If "serve", operation is happening on behalf of remote
546 ``$HG_SOURCE``. If "serve", operation is happening on behalf of remote
547 SSH or HTTP repository. If "push", "pull" or "bundle", operation
547 SSH or HTTP repository. If "push", "pull" or "bundle", operation
548 is happening on behalf of repository on same system.
548 is happening on behalf of repository on same system.
549 ``pretag``
549 ``pretag``
550 Run before creating a tag. Exit status 0 allows the tag to be
550 Run before creating a tag. Exit status 0 allows the tag to be
551 created. Non-zero status will cause the tag to fail. ID of
551 created. Non-zero status will cause the tag to fail. ID of
552 changeset to tag is in ``$HG_NODE``. Name of tag is in ``$HG_TAG``. Tag is
552 changeset to tag is in ``$HG_NODE``. Name of tag is in ``$HG_TAG``. Tag is
553 local if ``$HG_LOCAL=1``, in repository if ``$HG_LOCAL=0``.
553 local if ``$HG_LOCAL=1``, in repository if ``$HG_LOCAL=0``.
554 ``pretxnchangegroup``
554 ``pretxnchangegroup``
555 Run after a changegroup has been added via push, pull or unbundle,
555 Run after a changegroup has been added via push, pull or unbundle,
556 but before the transaction has been committed. Changegroup is
556 but before the transaction has been committed. Changegroup is
557 visible to hook program. This lets you validate incoming changes
557 visible to hook program. This lets you validate incoming changes
558 before accepting them. Passed the ID of the first new changeset in
558 before accepting them. Passed the ID of the first new changeset in
559 ``$HG_NODE``. Exit status 0 allows the transaction to commit. Non-zero
559 ``$HG_NODE``. Exit status 0 allows the transaction to commit. Non-zero
560 status will cause the transaction to be rolled back and the push,
560 status will cause the transaction to be rolled back and the push,
561 pull or unbundle will fail. URL that was source of changes is in
561 pull or unbundle will fail. URL that was source of changes is in
562 ``$HG_URL``.
562 ``$HG_URL``.
563 ``pretxncommit``
563 ``pretxncommit``
564 Run after a changeset has been created but the transaction not yet
564 Run after a changeset has been created but the transaction not yet
565 committed. Changeset is visible to hook program. This lets you
565 committed. Changeset is visible to hook program. This lets you
566 validate commit message and changes. Exit status 0 allows the
566 validate commit message and changes. Exit status 0 allows the
567 commit to proceed. Non-zero status will cause the transaction to
567 commit to proceed. Non-zero status will cause the transaction to
568 be rolled back. ID of changeset is in ``$HG_NODE``. Parent changeset
568 be rolled back. ID of changeset is in ``$HG_NODE``. Parent changeset
569 IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
569 IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
570 ``preupdate``
570 ``preupdate``
571 Run before updating the working directory. Exit status 0 allows
571 Run before updating the working directory. Exit status 0 allows
572 the update to proceed. Non-zero status will prevent the update.
572 the update to proceed. Non-zero status will prevent the update.
573 Changeset ID of first new parent is in ``$HG_PARENT1``. If merge, ID
573 Changeset ID of first new parent is in ``$HG_PARENT1``. If merge, ID
574 of second new parent is in ``$HG_PARENT2``.
574 of second new parent is in ``$HG_PARENT2``.
575 ``tag``
575 ``tag``
576 Run after a tag is created. ID of tagged changeset is in ``$HG_NODE``.
576 Run after a tag is created. ID of tagged changeset is in ``$HG_NODE``.
577 Name of tag is in ``$HG_TAG``. Tag is local if ``$HG_LOCAL=1``, in
577 Name of tag is in ``$HG_TAG``. Tag is local if ``$HG_LOCAL=1``, in
578 repository if ``$HG_LOCAL=0``.
578 repository if ``$HG_LOCAL=0``.
579 ``update``
579 ``update``
580 Run after updating the working directory. Changeset ID of first
580 Run after updating the working directory. Changeset ID of first
581 new parent is in ``$HG_PARENT1``. If merge, ID of second new parent is
581 new parent is in ``$HG_PARENT1``. If merge, ID of second new parent is
582 in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the
582 in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the
583 update failed (e.g. because conflicts not resolved), ``$HG_ERROR=1``.
583 update failed (e.g. because conflicts not resolved), ``$HG_ERROR=1``.
584
584
585 .. note:: It is generally better to use standard hooks rather than the
585 .. note:: It is generally better to use standard hooks rather than the
586 generic pre- and post- command hooks as they are guaranteed to be
586 generic pre- and post- command hooks as they are guaranteed to be
587 called in the appropriate contexts for influencing transactions.
587 called in the appropriate contexts for influencing transactions.
588 Also, hooks like "commit" will be called in all contexts that
588 Also, hooks like "commit" will be called in all contexts that
589 generate a commit (e.g. tag) and not just the commit command.
589 generate a commit (e.g. tag) and not just the commit command.
590
590
591 .. note:: Environment variables with empty values may not be passed to
591 .. note:: Environment variables with empty values may not be passed to
592 hooks on platforms such as Windows. As an example, ``$HG_PARENT2``
592 hooks on platforms such as Windows. As an example, ``$HG_PARENT2``
593 will have an empty value under Unix-like platforms for non-merge
593 will have an empty value under Unix-like platforms for non-merge
594 changesets, while it will not be available at all under Windows.
594 changesets, while it will not be available at all under Windows.
595
595
596 The syntax for Python hooks is as follows::
596 The syntax for Python hooks is as follows::
597
597
598 hookname = python:modulename.submodule.callable
598 hookname = python:modulename.submodule.callable
599 hookname = python:/path/to/python/module.py:callable
599 hookname = python:/path/to/python/module.py:callable
600
600
601 Python hooks are run within the Mercurial process. Each hook is
601 Python hooks are run within the Mercurial process. Each hook is
602 called with at least three keyword arguments: a ui object (keyword
602 called with at least three keyword arguments: a ui object (keyword
603 ``ui``), a repository object (keyword ``repo``), and a ``hooktype``
603 ``ui``), a repository object (keyword ``repo``), and a ``hooktype``
604 keyword that tells what kind of hook is used. Arguments listed as
604 keyword that tells what kind of hook is used. Arguments listed as
605 environment variables above are passed as keyword arguments, with no
605 environment variables above are passed as keyword arguments, with no
606 ``HG_`` prefix, and names in lower case.
606 ``HG_`` prefix, and names in lower case.
607
607
608 If a Python hook returns a "true" value or raises an exception, this
608 If a Python hook returns a "true" value or raises an exception, this
609 is treated as a failure.
609 is treated as a failure.
610
610
611
611
612 ``http_proxy``
612 ``http_proxy``
613 """"""""""""""
613 """"""""""""""
614 Used to access web-based Mercurial repositories through a HTTP
614 Used to access web-based Mercurial repositories through a HTTP
615 proxy.
615 proxy.
616
616
617 ``host``
617 ``host``
618 Host name and (optional) port of the proxy server, for example
618 Host name and (optional) port of the proxy server, for example
619 "myproxy:8000".
619 "myproxy:8000".
620 ``no``
620 ``no``
621 Optional. Comma-separated list of host names that should bypass
621 Optional. Comma-separated list of host names that should bypass
622 the proxy.
622 the proxy.
623 ``passwd``
623 ``passwd``
624 Optional. Password to authenticate with at the proxy server.
624 Optional. Password to authenticate with at the proxy server.
625 ``user``
625 ``user``
626 Optional. User name to authenticate with at the proxy server.
626 Optional. User name to authenticate with at the proxy server.
627 ``always``
627 ``always``
628 Optional. Always use the proxy, even for localhost and any entries
628 Optional. Always use the proxy, even for localhost and any entries
629 in ``http_proxy.no``. True or False. Default: False.
629 in ``http_proxy.no``. True or False. Default: False.
630
630
631 ``smtp``
631 ``smtp``
632 """"""""
632 """"""""
633 Configuration for extensions that need to send email messages.
633 Configuration for extensions that need to send email messages.
634
634
635 ``host``
635 ``host``
636 Host name of mail server, e.g. "mail.example.com".
636 Host name of mail server, e.g. "mail.example.com".
637 ``port``
637 ``port``
638 Optional. Port to connect to on mail server. Default: 25.
638 Optional. Port to connect to on mail server. Default: 25.
639 ``tls``
639 ``tls``
640 Optional. Whether to connect to mail server using TLS. True or
640 Optional. Whether to connect to mail server using TLS. True or
641 False. Default: False.
641 False. Default: False.
642 ``username``
642 ``username``
643 Optional. User name to authenticate to SMTP server with. If
643 Optional. User name to authenticate to SMTP server with. If
644 username is specified, password must also be specified.
644 username is specified, password must also be specified.
645 Default: none.
645 Default: none.
646 ``password``
646 ``password``
647 Optional. Password to authenticate to SMTP server with. If
647 Optional. Password to authenticate to SMTP server with. If
648 username is specified, password must also be specified.
648 username is specified, password must also be specified.
649 Default: none.
649 Default: none.
650 ``local_hostname``
650 ``local_hostname``
651 Optional. It's the hostname that the sender can use to identify
651 Optional. It's the hostname that the sender can use to identify
652 itself to the MTA.
652 itself to the MTA.
653
653
654
654
655 ``patch``
655 ``patch``
656 """""""""
656 """""""""
657 Settings used when applying patches, for instance through the 'import'
657 Settings used when applying patches, for instance through the 'import'
658 command or with Mercurial Queues extension.
658 command or with Mercurial Queues extension.
659
659
660 ``eol``
660 ``eol``
661 When set to 'strict' patch content and patched files end of lines
661 When set to 'strict' patch content and patched files end of lines
662 are preserved. When set to ``lf`` or ``crlf``, both files end of
662 are preserved. When set to ``lf`` or ``crlf``, both files end of
663 lines are ignored when patching and the result line endings are
663 lines are ignored when patching and the result line endings are
664 normalized to either LF (Unix) or CRLF (Windows). When set to
664 normalized to either LF (Unix) or CRLF (Windows). When set to
665 ``auto``, end of lines are again ignored while patching but line
665 ``auto``, end of lines are again ignored while patching but line
666 endings in patched files are normalized to their original setting
666 endings in patched files are normalized to their original setting
667 on a per-file basis. If target file does not exist or has no end
667 on a per-file basis. If target file does not exist or has no end
668 of line, patch line endings are preserved.
668 of line, patch line endings are preserved.
669 Default: strict.
669 Default: strict.
670
670
671
671
672 ``paths``
672 ``paths``
673 """""""""
673 """""""""
674 Assigns symbolic names to repositories. The left side is the
674 Assigns symbolic names to repositories. The left side is the
675 symbolic name, and the right gives the directory or URL that is the
675 symbolic name, and the right gives the directory or URL that is the
676 location of the repository. Default paths can be declared by setting
676 location of the repository. Default paths can be declared by setting
677 the following entries.
677 the following entries.
678
678
679 ``default``
679 ``default``
680 Directory or URL to use when pulling if no source is specified.
680 Directory or URL to use when pulling if no source is specified.
681 Default is set to repository from which the current repository was
681 Default is set to repository from which the current repository was
682 cloned.
682 cloned.
683 ``default-push``
683 ``default-push``
684 Optional. Directory or URL to use when pushing if no destination
684 Optional. Directory or URL to use when pushing if no destination
685 is specified.
685 is specified.
686
686
687
687
688 ``profiling``
688 ``profiling``
689 """""""""""""
689 """""""""""""
690 Specifies profiling format and file output. In this section
690 Specifies profiling format and file output. In this section
691 description, 'profiling data' stands for the raw data collected
691 description, 'profiling data' stands for the raw data collected
692 during profiling, while 'profiling report' stands for a statistical
692 during profiling, while 'profiling report' stands for a statistical
693 text report generated from the profiling data. The profiling is done
693 text report generated from the profiling data. The profiling is done
694 using lsprof.
694 using lsprof.
695
695
696 ``format``
696 ``format``
697 Profiling format.
697 Profiling format.
698 Default: text.
698 Default: text.
699
699
700 ``text``
700 ``text``
701 Generate a profiling report. When saving to a file, it should be
701 Generate a profiling report. When saving to a file, it should be
702 noted that only the report is saved, and the profiling data is
702 noted that only the report is saved, and the profiling data is
703 not kept.
703 not kept.
704 ``kcachegrind``
704 ``kcachegrind``
705 Format profiling data for kcachegrind use: when saving to a
705 Format profiling data for kcachegrind use: when saving to a
706 file, the generated file can directly be loaded into
706 file, the generated file can directly be loaded into
707 kcachegrind.
707 kcachegrind.
708 ``output``
708 ``output``
709 File path where profiling data or report should be saved. If the
709 File path where profiling data or report should be saved. If the
710 file exists, it is replaced. Default: None, data is printed on
710 file exists, it is replaced. Default: None, data is printed on
711 stderr
711 stderr
712
712
713 ``server``
713 ``server``
714 """"""""""
714 """"""""""
715 Controls generic server settings.
715 Controls generic server settings.
716
716
717 ``uncompressed``
717 ``uncompressed``
718 Whether to allow clients to clone a repository using the
718 Whether to allow clients to clone a repository using the
719 uncompressed streaming protocol. This transfers about 40% more
719 uncompressed streaming protocol. This transfers about 40% more
720 data than a regular clone, but uses less memory and CPU on both
720 data than a regular clone, but uses less memory and CPU on both
721 server and client. Over a LAN (100 Mbps or better) or a very fast
721 server and client. Over a LAN (100 Mbps or better) or a very fast
722 WAN, an uncompressed streaming clone is a lot faster (~10x) than a
722 WAN, an uncompressed streaming clone is a lot faster (~10x) than a
723 regular clone. Over most WAN connections (anything slower than
723 regular clone. Over most WAN connections (anything slower than
724 about 6 Mbps), uncompressed streaming is slower, because of the
724 about 6 Mbps), uncompressed streaming is slower, because of the
725 extra data transfer overhead. This mode will also temporarily hold
725 extra data transfer overhead. This mode will also temporarily hold
726 the write lock while determining what data to transfer.
726 the write lock while determining what data to transfer.
727 Default is True.
727 Default is True.
728
728
729 ``validate``
729 ``validate``
730 Whether to validate the completeness of pushed changesets by
730 Whether to validate the completeness of pushed changesets by
731 checking that all new file revisions specified in manifests are
731 checking that all new file revisions specified in manifests are
732 present. Default is False.
732 present. Default is False.
733
733
734 ``trusted``
734 ``trusted``
735 """""""""""
735 """""""""""
736 For security reasons, Mercurial will not use the settings in the
736 For security reasons, Mercurial will not use the settings in the
737 ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted
737 ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted
738 user or to a trusted group. The main exception is the web interface,
738 user or to a trusted group. The main exception is the web interface,
739 which automatically uses some safe settings, since it's common to
739 which automatically uses some safe settings, since it's common to
740 serve repositories from different users.
740 serve repositories from different users.
741
741
742 This section specifies what users and groups are trusted. The
742 This section specifies what users and groups are trusted. The
743 current user is always trusted. To trust everybody, list a user or a
743 current user is always trusted. To trust everybody, list a user or a
744 group with name ``*``.
744 group with name ``*``.
745
745
746 ``users``
746 ``users``
747 Comma-separated list of trusted users.
747 Comma-separated list of trusted users.
748 ``groups``
748 ``groups``
749 Comma-separated list of trusted groups.
749 Comma-separated list of trusted groups.
750
750
751
751
752 ``ui``
752 ``ui``
753 """"""
753 """"""
754
754
755 User interface controls.
755 User interface controls.
756
756
757 ``archivemeta``
757 ``archivemeta``
758 Whether to include the .hg_archival.txt file containing meta data
758 Whether to include the .hg_archival.txt file containing meta data
759 (hashes for the repository base and for tip) in archives created
759 (hashes for the repository base and for tip) in archives created
760 by the hg archive command or downloaded via hgweb.
760 by the hg archive command or downloaded via hgweb.
761 Default is True.
761 Default is True.
762 ``askusername``
762 ``askusername``
763 Whether to prompt for a username when committing. If True, and
763 Whether to prompt for a username when committing. If True, and
764 neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will
764 neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will
765 be prompted to enter a username. If no username is entered, the
765 be prompted to enter a username. If no username is entered, the
766 default ``USER@HOST`` is used instead.
766 default ``USER@HOST`` is used instead.
767 Default is False.
767 Default is False.
768 ``debug``
768 ``debug``
769 Print debugging information. True or False. Default is False.
769 Print debugging information. True or False. Default is False.
770 ``editor``
770 ``editor``
771 The editor to use during a commit. Default is ``$EDITOR`` or ``vi``.
771 The editor to use during a commit. Default is ``$EDITOR`` or ``vi``.
772 ``fallbackencoding``
772 ``fallbackencoding``
773 Encoding to try if it's not possible to decode the changelog using
773 Encoding to try if it's not possible to decode the changelog using
774 UTF-8. Default is ISO-8859-1.
774 UTF-8. Default is ISO-8859-1.
775 ``ignore``
775 ``ignore``
776 A file to read per-user ignore patterns from. This file should be
776 A file to read per-user ignore patterns from. This file should be
777 in the same format as a repository-wide .hgignore file. This
777 in the same format as a repository-wide .hgignore file. This
778 option supports hook syntax, so if you want to specify multiple
778 option supports hook syntax, so if you want to specify multiple
779 ignore files, you can do so by setting something like
779 ignore files, you can do so by setting something like
780 ``ignore.other = ~/.hgignore2``. For details of the ignore file
780 ``ignore.other = ~/.hgignore2``. For details of the ignore file
781 format, see the |hgignore(5)|_ man page.
781 format, see the |hgignore(5)|_ man page.
782 ``interactive``
782 ``interactive``
783 Allow to prompt the user. True or False. Default is True.
783 Allow to prompt the user. True or False. Default is True.
784 ``logtemplate``
784 ``logtemplate``
785 Template string for commands that print changesets.
785 Template string for commands that print changesets.
786 ``merge``
786 ``merge``
787 The conflict resolution program to use during a manual merge.
787 The conflict resolution program to use during a manual merge.
788 There are some internal tools available:
788 There are some internal tools available:
789
789
790 ``internal:local``
790 ``internal:local``
791 keep the local version
791 keep the local version
792 ``internal:other``
792 ``internal:other``
793 use the other version
793 use the other version
794 ``internal:merge``
794 ``internal:merge``
795 use the internal non-interactive merge tool
795 use the internal non-interactive merge tool
796 ``internal:fail``
796 ``internal:fail``
797 fail to merge
797 fail to merge
798
798
799 For more information on configuring merge tools see the
799 For more information on configuring merge tools see the
800 merge-tools_ section.
800 merge-tools_ section.
801
801
802 ``patch``
802 ``patch``
803 command to use to apply patches. Look for ``gpatch`` or ``patch`` in
803 command to use to apply patches. Look for ``gpatch`` or ``patch`` in
804 PATH if unset.
804 PATH if unset.
805 ``quiet``
805 ``quiet``
806 Reduce the amount of output printed. True or False. Default is False.
806 Reduce the amount of output printed. True or False. Default is False.
807 ``remotecmd``
807 ``remotecmd``
808 remote command to use for clone/push/pull operations. Default is ``hg``.
808 remote command to use for clone/push/pull operations. Default is ``hg``.
809 ``report_untrusted``
809 ``report_untrusted``
810 Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a
810 Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a
811 trusted user or group. True or False. Default is True.
811 trusted user or group. True or False. Default is True.
812 ``slash``
812 ``slash``
813 Display paths using a slash (``/``) as the path separator. This
813 Display paths using a slash (``/``) as the path separator. This
814 only makes a difference on systems where the default path
814 only makes a difference on systems where the default path
815 separator is not the slash character (e.g. Windows uses the
815 separator is not the slash character (e.g. Windows uses the
816 backslash character (``\``)).
816 backslash character (``\``)).
817 Default is False.
817 Default is False.
818 ``ssh``
818 ``ssh``
819 command to use for SSH connections. Default is ``ssh``.
819 command to use for SSH connections. Default is ``ssh``.
820 ``strict``
820 ``strict``
821 Require exact command names, instead of allowing unambiguous
821 Require exact command names, instead of allowing unambiguous
822 abbreviations. True or False. Default is False.
822 abbreviations. True or False. Default is False.
823 ``style``
823 ``style``
824 Name of style to use for command output.
824 Name of style to use for command output.
825 ``timeout``
825 ``timeout``
826 The timeout used when a lock is held (in seconds), a negative value
826 The timeout used when a lock is held (in seconds), a negative value
827 means no timeout. Default is 600.
827 means no timeout. Default is 600.
828 ``traceback``
828 ``traceback``
829 Mercurial always prints a traceback when an unknown exception
829 Mercurial always prints a traceback when an unknown exception
830 occurs. Setting this to True will make Mercurial print a traceback
830 occurs. Setting this to True will make Mercurial print a traceback
831 on all exceptions, even those recognized by Mercurial (such as
831 on all exceptions, even those recognized by Mercurial (such as
832 IOError or MemoryError). Default is False.
832 IOError or MemoryError). Default is False.
833 ``username``
833 ``username``
834 The committer of a changeset created when running "commit".
834 The committer of a changeset created when running "commit".
835 Typically a person's name and email address, e.g. ``Fred Widget
835 Typically a person's name and email address, e.g. ``Fred Widget
836 <fred@example.com>``. Default is ``$EMAIL`` or ``username@hostname``. If
836 <fred@example.com>``. Default is ``$EMAIL`` or ``username@hostname``. If
837 the username in hgrc is empty, it has to be specified manually or
837 the username in hgrc is empty, it has to be specified manually or
838 in a different hgrc file (e.g. ``$HOME/.hgrc``, if the admin set
838 in a different hgrc file (e.g. ``$HOME/.hgrc``, if the admin set
839 ``username =`` in the system hgrc).
839 ``username =`` in the system hgrc).
840 ``verbose``
840 ``verbose``
841 Increase the amount of output printed. True or False. Default is False.
841 Increase the amount of output printed. True or False. Default is False.
842
842
843
843
844 ``web``
844 ``web``
845 """""""
845 """""""
846 Web interface configuration.
846 Web interface configuration.
847
847
848 ``accesslog``
848 ``accesslog``
849 Where to output the access log. Default is stdout.
849 Where to output the access log. Default is stdout.
850 ``address``
850 ``address``
851 Interface address to bind to. Default is all.
851 Interface address to bind to. Default is all.
852 ``allow_archive``
852 ``allow_archive``
853 List of archive format (bz2, gz, zip) allowed for downloading.
853 List of archive format (bz2, gz, zip) allowed for downloading.
854 Default is empty.
854 Default is empty.
855 ``allowbz2``
855 ``allowbz2``
856 (DEPRECATED) Whether to allow .tar.bz2 downloading of repository
856 (DEPRECATED) Whether to allow .tar.bz2 downloading of repository
857 revisions.
857 revisions.
858 Default is False.
858 Default is False.
859 ``allowgz``
859 ``allowgz``
860 (DEPRECATED) Whether to allow .tar.gz downloading of repository
860 (DEPRECATED) Whether to allow .tar.gz downloading of repository
861 revisions.
861 revisions.
862 Default is False.
862 Default is False.
863 ``allowpull``
863 ``allowpull``
864 Whether to allow pulling from the repository. Default is True.
864 Whether to allow pulling from the repository. Default is True.
865 ``allow_push``
865 ``allow_push``
866 Whether to allow pushing to the repository. If empty or not set,
866 Whether to allow pushing to the repository. If empty or not set,
867 push is not allowed. If the special value ``*``, any remote user can
867 push is not allowed. If the special value ``*``, any remote user can
868 push, including unauthenticated users. Otherwise, the remote user
868 push, including unauthenticated users. Otherwise, the remote user
869 must have been authenticated, and the authenticated user name must
869 must have been authenticated, and the authenticated user name must
870 be present in this list (separated by whitespace or ``,``). The
870 be present in this list (separated by whitespace or ``,``). The
871 contents of the allow_push list are examined after the deny_push
871 contents of the allow_push list are examined after the deny_push
872 list.
872 list.
873 ``allow_read``
873 ``allow_read``
874 If the user has not already been denied repository access due to
874 If the user has not already been denied repository access due to
875 the contents of deny_read, this list determines whether to grant
875 the contents of deny_read, this list determines whether to grant
876 repository access to the user. If this list is not empty, and the
876 repository access to the user. If this list is not empty, and the
877 user is unauthenticated or not present in the list (separated by
877 user is unauthenticated or not present in the list (separated by
878 whitespace or ``,``), then access is denied for the user. If the
878 whitespace or ``,``), then access is denied for the user. If the
879 list is empty or not set, then access is permitted to all users by
879 list is empty or not set, then access is permitted to all users by
880 default. Setting allow_read to the special value ``*`` is equivalent
880 default. Setting allow_read to the special value ``*`` is equivalent
881 to it not being set (i.e. access is permitted to all users). The
881 to it not being set (i.e. access is permitted to all users). The
882 contents of the allow_read list are examined after the deny_read
882 contents of the allow_read list are examined after the deny_read
883 list.
883 list.
884 ``allowzip``
884 ``allowzip``
885 (DEPRECATED) Whether to allow .zip downloading of repository
885 (DEPRECATED) Whether to allow .zip downloading of repository
886 revisions. Default is False. This feature creates temporary files.
886 revisions. Default is False. This feature creates temporary files.
887 ``baseurl``
887 ``baseurl``
888 Base URL to use when publishing URLs in other locations, so
888 Base URL to use when publishing URLs in other locations, so
889 third-party tools like email notification hooks can construct
889 third-party tools like email notification hooks can construct
890 URLs. Example: ``http://hgserver/repos/``.
890 URLs. Example: ``http://hgserver/repos/``.
891 ``cacerts``
891 ``cacerts``
892 Path to file containing a list of PEM encoded certificate authorities
892 Path to file containing a list of PEM encoded certificate authorities
893 that may be used to verify an SSL server's identity. The form must be
893 that may be used to verify an SSL server's identity. The form must be
894 as follows::
894 as follows::
895
895
896 -----BEGIN CERTIFICATE-----
896 -----BEGIN CERTIFICATE-----
897 ... (certificate in base64 PEM encoding) ...
897 ... (certificate in base64 PEM encoding) ...
898 -----END CERTIFICATE-----
898 -----END CERTIFICATE-----
899 -----BEGIN CERTIFICATE-----
899 -----BEGIN CERTIFICATE-----
900 ... (certificate in base64 PEM encoding) ...
900 ... (certificate in base64 PEM encoding) ...
901 -----END CERTIFICATE-----
901 -----END CERTIFICATE-----
902
902
903 This feature is only supported when using Python 2.6. If you wish to
903 This feature is only supported when using Python 2.6. If you wish to
904 use it with earlier versions of Python, install the backported
904 use it with earlier versions of Python, install the backported
905 version of the ssl library that is available from
905 version of the ssl library that is available from
906 ``http://pypi.python.org``.
906 ``http://pypi.python.org``.
907
907
908 You can use OpenSSL's CA certificate file if your platform has one.
908 You can use OpenSSL's CA certificate file if your platform has one.
909 On most Linux systems this will be ``/etc/ssl/certs/ca-certificates.crt``.
909 On most Linux systems this will be ``/etc/ssl/certs/ca-certificates.crt``.
910 Otherwise you will have to generate this file manually.
910 Otherwise you will have to generate this file manually.
911 ``contact``
911 ``contact``
912 Name or email address of the person in charge of the repository.
912 Name or email address of the person in charge of the repository.
913 Defaults to ui.username or ``$EMAIL`` or "unknown" if unset or empty.
913 Defaults to ui.username or ``$EMAIL`` or "unknown" if unset or empty.
914 ``deny_push``
914 ``deny_push``
915 Whether to deny pushing to the repository. If empty or not set,
915 Whether to deny pushing to the repository. If empty or not set,
916 push is not denied. If the special value ``*``, all remote users are
916 push is not denied. If the special value ``*``, all remote users are
917 denied push. Otherwise, unauthenticated users are all denied, and
917 denied push. Otherwise, unauthenticated users are all denied, and
918 any authenticated user name present in this list (separated by
918 any authenticated user name present in this list (separated by
919 whitespace or ``,``) is also denied. The contents of the deny_push
919 whitespace or ``,``) is also denied. The contents of the deny_push
920 list are examined before the allow_push list.
920 list are examined before the allow_push list.
921 ``deny_read``
921 ``deny_read``
922 Whether to deny reading/viewing of the repository. If this list is
922 Whether to deny reading/viewing of the repository. If this list is
923 not empty, unauthenticated users are all denied, and any
923 not empty, unauthenticated users are all denied, and any
924 authenticated user name present in this list (separated by
924 authenticated user name present in this list (separated by
925 whitespace or ``,``) is also denied access to the repository. If set
925 whitespace or ``,``) is also denied access to the repository. If set
926 to the special value ``*``, all remote users are denied access
926 to the special value ``*``, all remote users are denied access
927 (rarely needed ;). If deny_read is empty or not set, the
927 (rarely needed ;). If deny_read is empty or not set, the
928 determination of repository access depends on the presence and
928 determination of repository access depends on the presence and
929 content of the allow_read list (see description). If both
929 content of the allow_read list (see description). If both
930 deny_read and allow_read are empty or not set, then access is
930 deny_read and allow_read are empty or not set, then access is
931 permitted to all users by default. If the repository is being
931 permitted to all users by default. If the repository is being
932 served via hgwebdir, denied users will not be able to see it in
932 served via hgwebdir, denied users will not be able to see it in
933 the list of repositories. The contents of the deny_read list have
933 the list of repositories. The contents of the deny_read list have
934 priority over (are examined before) the contents of the allow_read
934 priority over (are examined before) the contents of the allow_read
935 list.
935 list.
936 ``descend``
936 ``descend``
937 hgwebdir indexes will not descend into subdirectories. Only repositories
937 hgwebdir indexes will not descend into subdirectories. Only repositories
938 directly in the current path will be shown (other repositories are still
938 directly in the current path will be shown (other repositories are still
939 available from the index corresponding to their containing path).
939 available from the index corresponding to their containing path).
940 ``description``
940 ``description``
941 Textual description of the repository's purpose or contents.
941 Textual description of the repository's purpose or contents.
942 Default is "unknown".
942 Default is "unknown".
943 ``encoding``
943 ``encoding``
944 Character encoding name.
944 Character encoding name.
945 Example: "UTF-8"
945 Example: "UTF-8"
946 ``errorlog``
946 ``errorlog``
947 Where to output the error log. Default is stderr.
947 Where to output the error log. Default is stderr.
948 ``hidden``
948 ``hidden``
949 Whether to hide the repository in the hgwebdir index.
949 Whether to hide the repository in the hgwebdir index.
950 Default is False.
950 Default is False.
951 ``ipv6``
951 ``ipv6``
952 Whether to use IPv6. Default is False.
952 Whether to use IPv6. Default is False.
953 ``name``
953 ``name``
954 Repository name to use in the web interface. Default is current
954 Repository name to use in the web interface. Default is current
955 working directory.
955 working directory.
956 ``maxchanges``
956 ``maxchanges``
957 Maximum number of changes to list on the changelog. Default is 10.
957 Maximum number of changes to list on the changelog. Default is 10.
958 ``maxfiles``
958 ``maxfiles``
959 Maximum number of files to list per changeset. Default is 10.
959 Maximum number of files to list per changeset. Default is 10.
960 ``port``
960 ``port``
961 Port to listen on. Default is 8000.
961 Port to listen on. Default is 8000.
962 ``prefix``
962 ``prefix``
963 Prefix path to serve from. Default is '' (server root).
963 Prefix path to serve from. Default is '' (server root).
964 ``push_ssl``
964 ``push_ssl``
965 Whether to require that inbound pushes be transported over SSL to
965 Whether to require that inbound pushes be transported over SSL to
966 prevent password sniffing. Default is True.
966 prevent password sniffing. Default is True.
967 ``staticurl``
967 ``staticurl``
968 Base URL to use for static files. If unset, static files (e.g. the
968 Base URL to use for static files. If unset, static files (e.g. the
969 hgicon.png favicon) will be served by the CGI script itself. Use
969 hgicon.png favicon) will be served by the CGI script itself. Use
970 this setting to serve them directly with the HTTP server.
970 this setting to serve them directly with the HTTP server.
971 Example: ``http://hgserver/static/``.
971 Example: ``http://hgserver/static/``.
972 ``stripes``
972 ``stripes``
973 How many lines a "zebra stripe" should span in multiline output.
973 How many lines a "zebra stripe" should span in multiline output.
974 Default is 1; set to 0 to disable.
974 Default is 1; set to 0 to disable.
975 ``style``
975 ``style``
976 Which template map style to use.
976 Which template map style to use.
977 ``templates``
977 ``templates``
978 Where to find the HTML templates. Default is install path.
978 Where to find the HTML templates. Default is install path.
979
979
980
980
981 Author
981 Author
982 ------
982 ------
983 Bryan O'Sullivan <bos@serpentine.com>.
983 Bryan O'Sullivan <bos@serpentine.com>.
984
984
985 Mercurial was written by Matt Mackall <mpm@selenic.com>.
985 Mercurial was written by Matt Mackall <mpm@selenic.com>.
986
986
987 See Also
987 See Also
988 --------
988 --------
989 |hg(1)|_, |hgignore(5)|_
989 |hg(1)|_, |hgignore(5)|_
990
990
991 Copying
991 Copying
992 -------
992 -------
993 This manual page is copyright 2005 Bryan O'Sullivan.
993 This manual page is copyright 2005 Bryan O'Sullivan.
994 Mercurial is copyright 2005-2010 Matt Mackall.
994 Mercurial is copyright 2005-2010 Matt Mackall.
995 Free use of this software is granted under the terms of the GNU General
995 Free use of this software is granted under the terms of the GNU General
996 Public License version 2 or any later version.
996 Public License version 2 or any later version.
997
997
998 .. include:: common.txt
998 .. include:: common.txt
General Comments 0
You need to be logged in to leave comments. Login now