##// END OF EJS Templates
help/config: note 64-bit Windows registry key used with 32-bit Python...
Mike Williams -
r19183:9d88916f stable
parent child Browse files
Show More
@@ -1,1520 +1,1523 b''
1 The Mercurial system uses a set of configuration files to control
1 The Mercurial system uses a set of configuration files to control
2 aspects of its behavior.
2 aspects of its behavior.
3
3
4 The configuration files use a simple ini-file format. A configuration
4 The configuration files use a simple ini-file format. A configuration
5 file consists of sections, led by a ``[section]`` header and followed
5 file consists of sections, led by a ``[section]`` header and followed
6 by ``name = value`` entries::
6 by ``name = value`` entries::
7
7
8 [ui]
8 [ui]
9 username = Firstname Lastname <firstname.lastname@example.net>
9 username = Firstname Lastname <firstname.lastname@example.net>
10 verbose = True
10 verbose = True
11
11
12 The above entries will be referred to as ``ui.username`` and
12 The above entries will be referred to as ``ui.username`` and
13 ``ui.verbose``, respectively. See the Syntax section below.
13 ``ui.verbose``, respectively. See the Syntax section below.
14
14
15 Files
15 Files
16 =====
16 =====
17
17
18 Mercurial reads configuration data from several files, if they exist.
18 Mercurial reads configuration data from several files, if they exist.
19 These files do not exist by default and you will have to create the
19 These files do not exist by default and you will have to create the
20 appropriate configuration files yourself: global configuration like
20 appropriate configuration files yourself: global configuration like
21 the username setting is typically put into
21 the username setting is typically put into
22 ``%USERPROFILE%\mercurial.ini`` or ``$HOME/.hgrc`` and local
22 ``%USERPROFILE%\mercurial.ini`` or ``$HOME/.hgrc`` and local
23 configuration is put into the per-repository ``<repo>/.hg/hgrc`` file.
23 configuration is put into the per-repository ``<repo>/.hg/hgrc`` file.
24
24
25 The names of these files depend on the system on which Mercurial is
25 The names of these files depend on the system on which Mercurial is
26 installed. ``*.rc`` files from a single directory are read in
26 installed. ``*.rc`` files from a single directory are read in
27 alphabetical order, later ones overriding earlier ones. Where multiple
27 alphabetical order, later ones overriding earlier ones. Where multiple
28 paths are given below, settings from earlier paths override later
28 paths are given below, settings from earlier paths override later
29 ones.
29 ones.
30
30
31 | (All) ``<repo>/.hg/hgrc``
31 | (All) ``<repo>/.hg/hgrc``
32
32
33 Per-repository configuration options that only apply in a
33 Per-repository configuration options that only apply in a
34 particular repository. This file is not version-controlled, and
34 particular repository. This file is not version-controlled, and
35 will not get transferred during a "clone" operation. Options in
35 will not get transferred during a "clone" operation. Options in
36 this file override options in all other configuration files. On
36 this file override options in all other configuration files. On
37 Plan 9 and Unix, most of this file will be ignored if it doesn't
37 Plan 9 and Unix, most of this file will be ignored if it doesn't
38 belong to a trusted user or to a trusted group. See the documentation
38 belong to a trusted user or to a trusted group. See the documentation
39 for the ``[trusted]`` section below for more details.
39 for the ``[trusted]`` section below for more details.
40
40
41 | (Plan 9) ``$home/lib/hgrc``
41 | (Plan 9) ``$home/lib/hgrc``
42 | (Unix) ``$HOME/.hgrc``
42 | (Unix) ``$HOME/.hgrc``
43 | (Windows) ``%USERPROFILE%\.hgrc``
43 | (Windows) ``%USERPROFILE%\.hgrc``
44 | (Windows) ``%USERPROFILE%\Mercurial.ini``
44 | (Windows) ``%USERPROFILE%\Mercurial.ini``
45 | (Windows) ``%HOME%\.hgrc``
45 | (Windows) ``%HOME%\.hgrc``
46 | (Windows) ``%HOME%\Mercurial.ini``
46 | (Windows) ``%HOME%\Mercurial.ini``
47
47
48 Per-user configuration file(s), for the user running Mercurial. On
48 Per-user configuration file(s), for the user running Mercurial. On
49 Windows 9x, ``%HOME%`` is replaced by ``%APPDATA%``. Options in these
49 Windows 9x, ``%HOME%`` is replaced by ``%APPDATA%``. Options in these
50 files apply to all Mercurial commands executed by this user in any
50 files apply to all Mercurial commands executed by this user in any
51 directory. Options in these files override per-system and per-installation
51 directory. Options in these files override per-system and per-installation
52 options.
52 options.
53
53
54 | (Plan 9) ``/lib/mercurial/hgrc``
54 | (Plan 9) ``/lib/mercurial/hgrc``
55 | (Plan 9) ``/lib/mercurial/hgrc.d/*.rc``
55 | (Plan 9) ``/lib/mercurial/hgrc.d/*.rc``
56 | (Unix) ``/etc/mercurial/hgrc``
56 | (Unix) ``/etc/mercurial/hgrc``
57 | (Unix) ``/etc/mercurial/hgrc.d/*.rc``
57 | (Unix) ``/etc/mercurial/hgrc.d/*.rc``
58
58
59 Per-system configuration files, for the system on which Mercurial
59 Per-system configuration files, for the system on which Mercurial
60 is running. Options in these files apply to all Mercurial commands
60 is running. Options in these files apply to all Mercurial commands
61 executed by any user in any directory. Options in these files
61 executed by any user in any directory. Options in these files
62 override per-installation options.
62 override per-installation options.
63
63
64 | (Plan 9) ``<install-root>/lib/mercurial/hgrc``
64 | (Plan 9) ``<install-root>/lib/mercurial/hgrc``
65 | (Plan 9) ``<install-root>/lib/mercurial/hgrc.d/*.rc``
65 | (Plan 9) ``<install-root>/lib/mercurial/hgrc.d/*.rc``
66 | (Unix) ``<install-root>/etc/mercurial/hgrc``
66 | (Unix) ``<install-root>/etc/mercurial/hgrc``
67 | (Unix) ``<install-root>/etc/mercurial/hgrc.d/*.rc``
67 | (Unix) ``<install-root>/etc/mercurial/hgrc.d/*.rc``
68
68
69 Per-installation configuration files, searched for in the
69 Per-installation configuration files, searched for in the
70 directory where Mercurial is installed. ``<install-root>`` is the
70 directory where Mercurial is installed. ``<install-root>`` is the
71 parent directory of the **hg** executable (or symlink) being run. For
71 parent directory of the **hg** executable (or symlink) being run. For
72 example, if installed in ``/shared/tools/bin/hg``, Mercurial will look
72 example, if installed in ``/shared/tools/bin/hg``, Mercurial will look
73 in ``/shared/tools/etc/mercurial/hgrc``. Options in these files apply
73 in ``/shared/tools/etc/mercurial/hgrc``. Options in these files apply
74 to all Mercurial commands executed by any user in any directory.
74 to all Mercurial commands executed by any user in any directory.
75
75
76 | (Windows) ``<install-dir>\Mercurial.ini`` **or**
76 | (Windows) ``<install-dir>\Mercurial.ini`` **or**
77 | (Windows) ``<install-dir>\hgrc.d\*.rc`` **or**
77 | (Windows) ``<install-dir>\hgrc.d\*.rc`` **or**
78 | (Windows) ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial``
78 | (Windows) ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial``
79
79
80 Per-installation/system configuration files, for the system on
80 Per-installation/system configuration files, for the system on
81 which Mercurial is running. Options in these files apply to all
81 which Mercurial is running. Options in these files apply to all
82 Mercurial commands executed by any user in any directory. Registry
82 Mercurial commands executed by any user in any directory. Registry
83 keys contain PATH-like strings, every part of which must reference
83 keys contain PATH-like strings, every part of which must reference
84 a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will
84 a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will
85 be read. Mercurial checks each of these locations in the specified
85 be read. Mercurial checks each of these locations in the specified
86 order until one or more configuration files are detected.
86 order until one or more configuration files are detected.
87
87
88 .. note:: The registry key ``HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial``
89 is used when running 32-bit Python on 64-bit Windows.
90
88 Syntax
91 Syntax
89 ======
92 ======
90
93
91 A configuration file consists of sections, led by a ``[section]`` header
94 A configuration file consists of sections, led by a ``[section]`` header
92 and followed by ``name = value`` entries (sometimes called
95 and followed by ``name = value`` entries (sometimes called
93 ``configuration keys``)::
96 ``configuration keys``)::
94
97
95 [spam]
98 [spam]
96 eggs=ham
99 eggs=ham
97 green=
100 green=
98 eggs
101 eggs
99
102
100 Each line contains one entry. If the lines that follow are indented,
103 Each line contains one entry. If the lines that follow are indented,
101 they are treated as continuations of that entry. Leading whitespace is
104 they are treated as continuations of that entry. Leading whitespace is
102 removed from values. Empty lines are skipped. Lines beginning with
105 removed from values. Empty lines are skipped. Lines beginning with
103 ``#`` or ``;`` are ignored and may be used to provide comments.
106 ``#`` or ``;`` are ignored and may be used to provide comments.
104
107
105 Configuration keys can be set multiple times, in which case Mercurial
108 Configuration keys can be set multiple times, in which case Mercurial
106 will use the value that was configured last. As an example::
109 will use the value that was configured last. As an example::
107
110
108 [spam]
111 [spam]
109 eggs=large
112 eggs=large
110 ham=serrano
113 ham=serrano
111 eggs=small
114 eggs=small
112
115
113 This would set the configuration key named ``eggs`` to ``small``.
116 This would set the configuration key named ``eggs`` to ``small``.
114
117
115 It is also possible to define a section multiple times. A section can
118 It is also possible to define a section multiple times. A section can
116 be redefined on the same and/or on different configuration files. For
119 be redefined on the same and/or on different configuration files. For
117 example::
120 example::
118
121
119 [foo]
122 [foo]
120 eggs=large
123 eggs=large
121 ham=serrano
124 ham=serrano
122 eggs=small
125 eggs=small
123
126
124 [bar]
127 [bar]
125 eggs=ham
128 eggs=ham
126 green=
129 green=
127 eggs
130 eggs
128
131
129 [foo]
132 [foo]
130 ham=prosciutto
133 ham=prosciutto
131 eggs=medium
134 eggs=medium
132 bread=toasted
135 bread=toasted
133
136
134 This would set the ``eggs``, ``ham``, and ``bread`` configuration keys
137 This would set the ``eggs``, ``ham``, and ``bread`` configuration keys
135 of the ``foo`` section to ``medium``, ``prosciutto``, and ``toasted``,
138 of the ``foo`` section to ``medium``, ``prosciutto``, and ``toasted``,
136 respectively. As you can see there only thing that matters is the last
139 respectively. As you can see there only thing that matters is the last
137 value that was set for each of the configuration keys.
140 value that was set for each of the configuration keys.
138
141
139 If a configuration key is set multiple times in different
142 If a configuration key is set multiple times in different
140 configuration files the final value will depend on the order in which
143 configuration files the final value will depend on the order in which
141 the different configuration files are read, with settings from earlier
144 the different configuration files are read, with settings from earlier
142 paths overriding later ones as described on the ``Files`` section
145 paths overriding later ones as described on the ``Files`` section
143 above.
146 above.
144
147
145 A line of the form ``%include file`` will include ``file`` into the
148 A line of the form ``%include file`` will include ``file`` into the
146 current configuration file. The inclusion is recursive, which means
149 current configuration file. The inclusion is recursive, which means
147 that included files can include other files. Filenames are relative to
150 that included files can include other files. Filenames are relative to
148 the configuration file in which the ``%include`` directive is found.
151 the configuration file in which the ``%include`` directive is found.
149 Environment variables and ``~user`` constructs are expanded in
152 Environment variables and ``~user`` constructs are expanded in
150 ``file``. This lets you do something like::
153 ``file``. This lets you do something like::
151
154
152 %include ~/.hgrc.d/$HOST.rc
155 %include ~/.hgrc.d/$HOST.rc
153
156
154 to include a different configuration file on each computer you use.
157 to include a different configuration file on each computer you use.
155
158
156 A line with ``%unset name`` will remove ``name`` from the current
159 A line with ``%unset name`` will remove ``name`` from the current
157 section, if it has been set previously.
160 section, if it has been set previously.
158
161
159 The values are either free-form text strings, lists of text strings,
162 The values are either free-form text strings, lists of text strings,
160 or Boolean values. Boolean values can be set to true using any of "1",
163 or Boolean values. Boolean values can be set to true using any of "1",
161 "yes", "true", or "on" and to false using "0", "no", "false", or "off"
164 "yes", "true", or "on" and to false using "0", "no", "false", or "off"
162 (all case insensitive).
165 (all case insensitive).
163
166
164 List values are separated by whitespace or comma, except when values are
167 List values are separated by whitespace or comma, except when values are
165 placed in double quotation marks::
168 placed in double quotation marks::
166
169
167 allow_read = "John Doe, PhD", brian, betty
170 allow_read = "John Doe, PhD", brian, betty
168
171
169 Quotation marks can be escaped by prefixing them with a backslash. Only
172 Quotation marks can be escaped by prefixing them with a backslash. Only
170 quotation marks at the beginning of a word is counted as a quotation
173 quotation marks at the beginning of a word is counted as a quotation
171 (e.g., ``foo"bar baz`` is the list of ``foo"bar`` and ``baz``).
174 (e.g., ``foo"bar baz`` is the list of ``foo"bar`` and ``baz``).
172
175
173 Sections
176 Sections
174 ========
177 ========
175
178
176 This section describes the different sections that may appear in a
179 This section describes the different sections that may appear in a
177 Mercurial configuration file, the purpose of each section, its possible
180 Mercurial configuration file, the purpose of each section, its possible
178 keys, and their possible values.
181 keys, and their possible values.
179
182
180 ``alias``
183 ``alias``
181 ---------
184 ---------
182
185
183 Defines command aliases.
186 Defines command aliases.
184 Aliases allow you to define your own commands in terms of other
187 Aliases allow you to define your own commands in terms of other
185 commands (or aliases), optionally including arguments. Positional
188 commands (or aliases), optionally including arguments. Positional
186 arguments in the form of ``$1``, ``$2``, etc in the alias definition
189 arguments in the form of ``$1``, ``$2``, etc in the alias definition
187 are expanded by Mercurial before execution. Positional arguments not
190 are expanded by Mercurial before execution. Positional arguments not
188 already used by ``$N`` in the definition are put at the end of the
191 already used by ``$N`` in the definition are put at the end of the
189 command to be executed.
192 command to be executed.
190
193
191 Alias definitions consist of lines of the form::
194 Alias definitions consist of lines of the form::
192
195
193 <alias> = <command> [<argument>]...
196 <alias> = <command> [<argument>]...
194
197
195 For example, this definition::
198 For example, this definition::
196
199
197 latest = log --limit 5
200 latest = log --limit 5
198
201
199 creates a new command ``latest`` that shows only the five most recent
202 creates a new command ``latest`` that shows only the five most recent
200 changesets. You can define subsequent aliases using earlier ones::
203 changesets. You can define subsequent aliases using earlier ones::
201
204
202 stable5 = latest -b stable
205 stable5 = latest -b stable
203
206
204 .. note:: It is possible to create aliases with the same names as
207 .. note:: It is possible to create aliases with the same names as
205 existing commands, which will then override the original
208 existing commands, which will then override the original
206 definitions. This is almost always a bad idea!
209 definitions. This is almost always a bad idea!
207
210
208 An alias can start with an exclamation point (``!``) to make it a
211 An alias can start with an exclamation point (``!``) to make it a
209 shell alias. A shell alias is executed with the shell and will let you
212 shell alias. A shell alias is executed with the shell and will let you
210 run arbitrary commands. As an example, ::
213 run arbitrary commands. As an example, ::
211
214
212 echo = !echo $@
215 echo = !echo $@
213
216
214 will let you do ``hg echo foo`` to have ``foo`` printed in your
217 will let you do ``hg echo foo`` to have ``foo`` printed in your
215 terminal. A better example might be::
218 terminal. A better example might be::
216
219
217 purge = !$HG status --no-status --unknown -0 | xargs -0 rm
220 purge = !$HG status --no-status --unknown -0 | xargs -0 rm
218
221
219 which will make ``hg purge`` delete all unknown files in the
222 which will make ``hg purge`` delete all unknown files in the
220 repository in the same manner as the purge extension.
223 repository in the same manner as the purge extension.
221
224
222 Positional arguments like ``$1``, ``$2``, etc. in the alias definition
225 Positional arguments like ``$1``, ``$2``, etc. in the alias definition
223 expand to the command arguments. Unmatched arguments are
226 expand to the command arguments. Unmatched arguments are
224 removed. ``$0`` expands to the alias name and ``$@`` expands to all
227 removed. ``$0`` expands to the alias name and ``$@`` expands to all
225 arguments separated by a space. These expansions happen before the
228 arguments separated by a space. These expansions happen before the
226 command is passed to the shell.
229 command is passed to the shell.
227
230
228 Shell aliases are executed in an environment where ``$HG`` expands to
231 Shell aliases are executed in an environment where ``$HG`` expands to
229 the path of the Mercurial that was used to execute the alias. This is
232 the path of the Mercurial that was used to execute the alias. This is
230 useful when you want to call further Mercurial commands in a shell
233 useful when you want to call further Mercurial commands in a shell
231 alias, as was done above for the purge alias. In addition,
234 alias, as was done above for the purge alias. In addition,
232 ``$HG_ARGS`` expands to the arguments given to Mercurial. In the ``hg
235 ``$HG_ARGS`` expands to the arguments given to Mercurial. In the ``hg
233 echo foo`` call above, ``$HG_ARGS`` would expand to ``echo foo``.
236 echo foo`` call above, ``$HG_ARGS`` would expand to ``echo foo``.
234
237
235 .. note:: Some global configuration options such as ``-R`` are
238 .. note:: Some global configuration options such as ``-R`` are
236 processed before shell aliases and will thus not be passed to
239 processed before shell aliases and will thus not be passed to
237 aliases.
240 aliases.
238
241
239
242
240 ``annotate``
243 ``annotate``
241 ------------
244 ------------
242
245
243 Settings used when displaying file annotations. All values are
246 Settings used when displaying file annotations. All values are
244 Booleans and default to False. See ``diff`` section for related
247 Booleans and default to False. See ``diff`` section for related
245 options for the diff command.
248 options for the diff command.
246
249
247 ``ignorews``
250 ``ignorews``
248 Ignore white space when comparing lines.
251 Ignore white space when comparing lines.
249
252
250 ``ignorewsamount``
253 ``ignorewsamount``
251 Ignore changes in the amount of white space.
254 Ignore changes in the amount of white space.
252
255
253 ``ignoreblanklines``
256 ``ignoreblanklines``
254 Ignore changes whose lines are all blank.
257 Ignore changes whose lines are all blank.
255
258
256
259
257 ``auth``
260 ``auth``
258 --------
261 --------
259
262
260 Authentication credentials for HTTP authentication. This section
263 Authentication credentials for HTTP authentication. This section
261 allows you to store usernames and passwords for use when logging
264 allows you to store usernames and passwords for use when logging
262 *into* HTTP servers. See the ``[web]`` configuration section if
265 *into* HTTP servers. See the ``[web]`` configuration section if
263 you want to configure *who* can login to your HTTP server.
266 you want to configure *who* can login to your HTTP server.
264
267
265 Each line has the following format::
268 Each line has the following format::
266
269
267 <name>.<argument> = <value>
270 <name>.<argument> = <value>
268
271
269 where ``<name>`` is used to group arguments into authentication
272 where ``<name>`` is used to group arguments into authentication
270 entries. Example::
273 entries. Example::
271
274
272 foo.prefix = hg.intevation.org/mercurial
275 foo.prefix = hg.intevation.org/mercurial
273 foo.username = foo
276 foo.username = foo
274 foo.password = bar
277 foo.password = bar
275 foo.schemes = http https
278 foo.schemes = http https
276
279
277 bar.prefix = secure.example.org
280 bar.prefix = secure.example.org
278 bar.key = path/to/file.key
281 bar.key = path/to/file.key
279 bar.cert = path/to/file.cert
282 bar.cert = path/to/file.cert
280 bar.schemes = https
283 bar.schemes = https
281
284
282 Supported arguments:
285 Supported arguments:
283
286
284 ``prefix``
287 ``prefix``
285 Either ``*`` or a URI prefix with or without the scheme part.
288 Either ``*`` or a URI prefix with or without the scheme part.
286 The authentication entry with the longest matching prefix is used
289 The authentication entry with the longest matching prefix is used
287 (where ``*`` matches everything and counts as a match of length
290 (where ``*`` matches everything and counts as a match of length
288 1). If the prefix doesn't include a scheme, the match is performed
291 1). If the prefix doesn't include a scheme, the match is performed
289 against the URI with its scheme stripped as well, and the schemes
292 against the URI with its scheme stripped as well, and the schemes
290 argument, q.v., is then subsequently consulted.
293 argument, q.v., is then subsequently consulted.
291
294
292 ``username``
295 ``username``
293 Optional. Username to authenticate with. If not given, and the
296 Optional. Username to authenticate with. If not given, and the
294 remote site requires basic or digest authentication, the user will
297 remote site requires basic or digest authentication, the user will
295 be prompted for it. Environment variables are expanded in the
298 be prompted for it. Environment variables are expanded in the
296 username letting you do ``foo.username = $USER``. If the URI
299 username letting you do ``foo.username = $USER``. If the URI
297 includes a username, only ``[auth]`` entries with a matching
300 includes a username, only ``[auth]`` entries with a matching
298 username or without a username will be considered.
301 username or without a username will be considered.
299
302
300 ``password``
303 ``password``
301 Optional. Password to authenticate with. If not given, and the
304 Optional. Password to authenticate with. If not given, and the
302 remote site requires basic or digest authentication, the user
305 remote site requires basic or digest authentication, the user
303 will be prompted for it.
306 will be prompted for it.
304
307
305 ``key``
308 ``key``
306 Optional. PEM encoded client certificate key file. Environment
309 Optional. PEM encoded client certificate key file. Environment
307 variables are expanded in the filename.
310 variables are expanded in the filename.
308
311
309 ``cert``
312 ``cert``
310 Optional. PEM encoded client certificate chain file. Environment
313 Optional. PEM encoded client certificate chain file. Environment
311 variables are expanded in the filename.
314 variables are expanded in the filename.
312
315
313 ``schemes``
316 ``schemes``
314 Optional. Space separated list of URI schemes to use this
317 Optional. Space separated list of URI schemes to use this
315 authentication entry with. Only used if the prefix doesn't include
318 authentication entry with. Only used if the prefix doesn't include
316 a scheme. Supported schemes are http and https. They will match
319 a scheme. Supported schemes are http and https. They will match
317 static-http and static-https respectively, as well.
320 static-http and static-https respectively, as well.
318 Default: https.
321 Default: https.
319
322
320 If no suitable authentication entry is found, the user is prompted
323 If no suitable authentication entry is found, the user is prompted
321 for credentials as usual if required by the remote.
324 for credentials as usual if required by the remote.
322
325
323
326
324 ``decode/encode``
327 ``decode/encode``
325 -----------------
328 -----------------
326
329
327 Filters for transforming files on checkout/checkin. This would
330 Filters for transforming files on checkout/checkin. This would
328 typically be used for newline processing or other
331 typically be used for newline processing or other
329 localization/canonicalization of files.
332 localization/canonicalization of files.
330
333
331 Filters consist of a filter pattern followed by a filter command.
334 Filters consist of a filter pattern followed by a filter command.
332 Filter patterns are globs by default, rooted at the repository root.
335 Filter patterns are globs by default, rooted at the repository root.
333 For example, to match any file ending in ``.txt`` in the root
336 For example, to match any file ending in ``.txt`` in the root
334 directory only, use the pattern ``*.txt``. To match any file ending
337 directory only, use the pattern ``*.txt``. To match any file ending
335 in ``.c`` anywhere in the repository, use the pattern ``**.c``.
338 in ``.c`` anywhere in the repository, use the pattern ``**.c``.
336 For each file only the first matching filter applies.
339 For each file only the first matching filter applies.
337
340
338 The filter command can start with a specifier, either ``pipe:`` or
341 The filter command can start with a specifier, either ``pipe:`` or
339 ``tempfile:``. If no specifier is given, ``pipe:`` is used by default.
342 ``tempfile:``. If no specifier is given, ``pipe:`` is used by default.
340
343
341 A ``pipe:`` command must accept data on stdin and return the transformed
344 A ``pipe:`` command must accept data on stdin and return the transformed
342 data on stdout.
345 data on stdout.
343
346
344 Pipe example::
347 Pipe example::
345
348
346 [encode]
349 [encode]
347 # uncompress gzip files on checkin to improve delta compression
350 # uncompress gzip files on checkin to improve delta compression
348 # note: not necessarily a good idea, just an example
351 # note: not necessarily a good idea, just an example
349 *.gz = pipe: gunzip
352 *.gz = pipe: gunzip
350
353
351 [decode]
354 [decode]
352 # recompress gzip files when writing them to the working dir (we
355 # recompress gzip files when writing them to the working dir (we
353 # can safely omit "pipe:", because it's the default)
356 # can safely omit "pipe:", because it's the default)
354 *.gz = gzip
357 *.gz = gzip
355
358
356 A ``tempfile:`` command is a template. The string ``INFILE`` is replaced
359 A ``tempfile:`` command is a template. The string ``INFILE`` is replaced
357 with the name of a temporary file that contains the data to be
360 with the name of a temporary file that contains the data to be
358 filtered by the command. The string ``OUTFILE`` is replaced with the name
361 filtered by the command. The string ``OUTFILE`` is replaced with the name
359 of an empty temporary file, where the filtered data must be written by
362 of an empty temporary file, where the filtered data must be written by
360 the command.
363 the command.
361
364
362 .. note:: The tempfile mechanism is recommended for Windows systems,
365 .. note:: The tempfile mechanism is recommended for Windows systems,
363 where the standard shell I/O redirection operators often have
366 where the standard shell I/O redirection operators often have
364 strange effects and may corrupt the contents of your files.
367 strange effects and may corrupt the contents of your files.
365
368
366 This filter mechanism is used internally by the ``eol`` extension to
369 This filter mechanism is used internally by the ``eol`` extension to
367 translate line ending characters between Windows (CRLF) and Unix (LF)
370 translate line ending characters between Windows (CRLF) and Unix (LF)
368 format. We suggest you use the ``eol`` extension for convenience.
371 format. We suggest you use the ``eol`` extension for convenience.
369
372
370
373
371 ``defaults``
374 ``defaults``
372 ------------
375 ------------
373
376
374 (defaults are deprecated. Don't use them. Use aliases instead)
377 (defaults are deprecated. Don't use them. Use aliases instead)
375
378
376 Use the ``[defaults]`` section to define command defaults, i.e. the
379 Use the ``[defaults]`` section to define command defaults, i.e. the
377 default options/arguments to pass to the specified commands.
380 default options/arguments to pass to the specified commands.
378
381
379 The following example makes :hg:`log` run in verbose mode, and
382 The following example makes :hg:`log` run in verbose mode, and
380 :hg:`status` show only the modified files, by default::
383 :hg:`status` show only the modified files, by default::
381
384
382 [defaults]
385 [defaults]
383 log = -v
386 log = -v
384 status = -m
387 status = -m
385
388
386 The actual commands, instead of their aliases, must be used when
389 The actual commands, instead of their aliases, must be used when
387 defining command defaults. The command defaults will also be applied
390 defining command defaults. The command defaults will also be applied
388 to the aliases of the commands defined.
391 to the aliases of the commands defined.
389
392
390
393
391 ``diff``
394 ``diff``
392 --------
395 --------
393
396
394 Settings used when displaying diffs. Everything except for ``unified``
397 Settings used when displaying diffs. Everything except for ``unified``
395 is a Boolean and defaults to False. See ``annotate`` section for
398 is a Boolean and defaults to False. See ``annotate`` section for
396 related options for the annotate command.
399 related options for the annotate command.
397
400
398 ``git``
401 ``git``
399 Use git extended diff format.
402 Use git extended diff format.
400
403
401 ``nodates``
404 ``nodates``
402 Don't include dates in diff headers.
405 Don't include dates in diff headers.
403
406
404 ``showfunc``
407 ``showfunc``
405 Show which function each change is in.
408 Show which function each change is in.
406
409
407 ``ignorews``
410 ``ignorews``
408 Ignore white space when comparing lines.
411 Ignore white space when comparing lines.
409
412
410 ``ignorewsamount``
413 ``ignorewsamount``
411 Ignore changes in the amount of white space.
414 Ignore changes in the amount of white space.
412
415
413 ``ignoreblanklines``
416 ``ignoreblanklines``
414 Ignore changes whose lines are all blank.
417 Ignore changes whose lines are all blank.
415
418
416 ``unified``
419 ``unified``
417 Number of lines of context to show.
420 Number of lines of context to show.
418
421
419 ``email``
422 ``email``
420 ---------
423 ---------
421
424
422 Settings for extensions that send email messages.
425 Settings for extensions that send email messages.
423
426
424 ``from``
427 ``from``
425 Optional. Email address to use in "From" header and SMTP envelope
428 Optional. Email address to use in "From" header and SMTP envelope
426 of outgoing messages.
429 of outgoing messages.
427
430
428 ``to``
431 ``to``
429 Optional. Comma-separated list of recipients' email addresses.
432 Optional. Comma-separated list of recipients' email addresses.
430
433
431 ``cc``
434 ``cc``
432 Optional. Comma-separated list of carbon copy recipients'
435 Optional. Comma-separated list of carbon copy recipients'
433 email addresses.
436 email addresses.
434
437
435 ``bcc``
438 ``bcc``
436 Optional. Comma-separated list of blind carbon copy recipients'
439 Optional. Comma-separated list of blind carbon copy recipients'
437 email addresses.
440 email addresses.
438
441
439 ``method``
442 ``method``
440 Optional. Method to use to send email messages. If value is ``smtp``
443 Optional. Method to use to send email messages. If value is ``smtp``
441 (default), use SMTP (see the ``[smtp]`` section for configuration).
444 (default), use SMTP (see the ``[smtp]`` section for configuration).
442 Otherwise, use as name of program to run that acts like sendmail
445 Otherwise, use as name of program to run that acts like sendmail
443 (takes ``-f`` option for sender, list of recipients on command line,
446 (takes ``-f`` option for sender, list of recipients on command line,
444 message on stdin). Normally, setting this to ``sendmail`` or
447 message on stdin). Normally, setting this to ``sendmail`` or
445 ``/usr/sbin/sendmail`` is enough to use sendmail to send messages.
448 ``/usr/sbin/sendmail`` is enough to use sendmail to send messages.
446
449
447 ``charsets``
450 ``charsets``
448 Optional. Comma-separated list of character sets considered
451 Optional. Comma-separated list of character sets considered
449 convenient for recipients. Addresses, headers, and parts not
452 convenient for recipients. Addresses, headers, and parts not
450 containing patches of outgoing messages will be encoded in the
453 containing patches of outgoing messages will be encoded in the
451 first character set to which conversion from local encoding
454 first character set to which conversion from local encoding
452 (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct
455 (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct
453 conversion fails, the text in question is sent as is. Defaults to
456 conversion fails, the text in question is sent as is. Defaults to
454 empty (explicit) list.
457 empty (explicit) list.
455
458
456 Order of outgoing email character sets:
459 Order of outgoing email character sets:
457
460
458 1. ``us-ascii``: always first, regardless of settings
461 1. ``us-ascii``: always first, regardless of settings
459 2. ``email.charsets``: in order given by user
462 2. ``email.charsets``: in order given by user
460 3. ``ui.fallbackencoding``: if not in email.charsets
463 3. ``ui.fallbackencoding``: if not in email.charsets
461 4. ``$HGENCODING``: if not in email.charsets
464 4. ``$HGENCODING``: if not in email.charsets
462 5. ``utf-8``: always last, regardless of settings
465 5. ``utf-8``: always last, regardless of settings
463
466
464 Email example::
467 Email example::
465
468
466 [email]
469 [email]
467 from = Joseph User <joe.user@example.com>
470 from = Joseph User <joe.user@example.com>
468 method = /usr/sbin/sendmail
471 method = /usr/sbin/sendmail
469 # charsets for western Europeans
472 # charsets for western Europeans
470 # us-ascii, utf-8 omitted, as they are tried first and last
473 # us-ascii, utf-8 omitted, as they are tried first and last
471 charsets = iso-8859-1, iso-8859-15, windows-1252
474 charsets = iso-8859-1, iso-8859-15, windows-1252
472
475
473
476
474 ``extensions``
477 ``extensions``
475 --------------
478 --------------
476
479
477 Mercurial has an extension mechanism for adding new features. To
480 Mercurial has an extension mechanism for adding new features. To
478 enable an extension, create an entry for it in this section.
481 enable an extension, create an entry for it in this section.
479
482
480 If you know that the extension is already in Python's search path,
483 If you know that the extension is already in Python's search path,
481 you can give the name of the module, followed by ``=``, with nothing
484 you can give the name of the module, followed by ``=``, with nothing
482 after the ``=``.
485 after the ``=``.
483
486
484 Otherwise, give a name that you choose, followed by ``=``, followed by
487 Otherwise, give a name that you choose, followed by ``=``, followed by
485 the path to the ``.py`` file (including the file name extension) that
488 the path to the ``.py`` file (including the file name extension) that
486 defines the extension.
489 defines the extension.
487
490
488 To explicitly disable an extension that is enabled in an hgrc of
491 To explicitly disable an extension that is enabled in an hgrc of
489 broader scope, prepend its path with ``!``, as in ``foo = !/ext/path``
492 broader scope, prepend its path with ``!``, as in ``foo = !/ext/path``
490 or ``foo = !`` when path is not supplied.
493 or ``foo = !`` when path is not supplied.
491
494
492 Example for ``~/.hgrc``::
495 Example for ``~/.hgrc``::
493
496
494 [extensions]
497 [extensions]
495 # (the mq extension will get loaded from Mercurial's path)
498 # (the mq extension will get loaded from Mercurial's path)
496 mq =
499 mq =
497 # (this extension will get loaded from the file specified)
500 # (this extension will get loaded from the file specified)
498 myfeature = ~/.hgext/myfeature.py
501 myfeature = ~/.hgext/myfeature.py
499
502
500
503
501 ``format``
504 ``format``
502 ----------
505 ----------
503
506
504 ``usestore``
507 ``usestore``
505 Enable or disable the "store" repository format which improves
508 Enable or disable the "store" repository format which improves
506 compatibility with systems that fold case or otherwise mangle
509 compatibility with systems that fold case or otherwise mangle
507 filenames. Enabled by default. Disabling this option will allow
510 filenames. Enabled by default. Disabling this option will allow
508 you to store longer filenames in some situations at the expense of
511 you to store longer filenames in some situations at the expense of
509 compatibility and ensures that the on-disk format of newly created
512 compatibility and ensures that the on-disk format of newly created
510 repositories will be compatible with Mercurial before version 0.9.4.
513 repositories will be compatible with Mercurial before version 0.9.4.
511
514
512 ``usefncache``
515 ``usefncache``
513 Enable or disable the "fncache" repository format which enhances
516 Enable or disable the "fncache" repository format which enhances
514 the "store" repository format (which has to be enabled to use
517 the "store" repository format (which has to be enabled to use
515 fncache) to allow longer filenames and avoids using Windows
518 fncache) to allow longer filenames and avoids using Windows
516 reserved names, e.g. "nul". Enabled by default. Disabling this
519 reserved names, e.g. "nul". Enabled by default. Disabling this
517 option ensures that the on-disk format of newly created
520 option ensures that the on-disk format of newly created
518 repositories will be compatible with Mercurial before version 1.1.
521 repositories will be compatible with Mercurial before version 1.1.
519
522
520 ``dotencode``
523 ``dotencode``
521 Enable or disable the "dotencode" repository format which enhances
524 Enable or disable the "dotencode" repository format which enhances
522 the "fncache" repository format (which has to be enabled to use
525 the "fncache" repository format (which has to be enabled to use
523 dotencode) to avoid issues with filenames starting with ._ on
526 dotencode) to avoid issues with filenames starting with ._ on
524 Mac OS X and spaces on Windows. Enabled by default. Disabling this
527 Mac OS X and spaces on Windows. Enabled by default. Disabling this
525 option ensures that the on-disk format of newly created
528 option ensures that the on-disk format of newly created
526 repositories will be compatible with Mercurial before version 1.7.
529 repositories will be compatible with Mercurial before version 1.7.
527
530
528 ``graph``
531 ``graph``
529 ---------
532 ---------
530
533
531 Web graph view configuration. This section let you change graph
534 Web graph view configuration. This section let you change graph
532 elements display properties by branches, for instance to make the
535 elements display properties by branches, for instance to make the
533 ``default`` branch stand out.
536 ``default`` branch stand out.
534
537
535 Each line has the following format::
538 Each line has the following format::
536
539
537 <branch>.<argument> = <value>
540 <branch>.<argument> = <value>
538
541
539 where ``<branch>`` is the name of the branch being
542 where ``<branch>`` is the name of the branch being
540 customized. Example::
543 customized. Example::
541
544
542 [graph]
545 [graph]
543 # 2px width
546 # 2px width
544 default.width = 2
547 default.width = 2
545 # red color
548 # red color
546 default.color = FF0000
549 default.color = FF0000
547
550
548 Supported arguments:
551 Supported arguments:
549
552
550 ``width``
553 ``width``
551 Set branch edges width in pixels.
554 Set branch edges width in pixels.
552
555
553 ``color``
556 ``color``
554 Set branch edges color in hexadecimal RGB notation.
557 Set branch edges color in hexadecimal RGB notation.
555
558
556 ``hooks``
559 ``hooks``
557 ---------
560 ---------
558
561
559 Commands or Python functions that get automatically executed by
562 Commands or Python functions that get automatically executed by
560 various actions such as starting or finishing a commit. Multiple
563 various actions such as starting or finishing a commit. Multiple
561 hooks can be run for the same action by appending a suffix to the
564 hooks can be run for the same action by appending a suffix to the
562 action. Overriding a site-wide hook can be done by changing its
565 action. Overriding a site-wide hook can be done by changing its
563 value or setting it to an empty string. Hooks can be prioritized
566 value or setting it to an empty string. Hooks can be prioritized
564 by adding a prefix of ``priority`` to the hook name on a new line
567 by adding a prefix of ``priority`` to the hook name on a new line
565 and setting the priority. The default priority is 0 if
568 and setting the priority. The default priority is 0 if
566 not specified.
569 not specified.
567
570
568 Example ``.hg/hgrc``::
571 Example ``.hg/hgrc``::
569
572
570 [hooks]
573 [hooks]
571 # update working directory after adding changesets
574 # update working directory after adding changesets
572 changegroup.update = hg update
575 changegroup.update = hg update
573 # do not use the site-wide hook
576 # do not use the site-wide hook
574 incoming =
577 incoming =
575 incoming.email = /my/email/hook
578 incoming.email = /my/email/hook
576 incoming.autobuild = /my/build/hook
579 incoming.autobuild = /my/build/hook
577 # force autobuild hook to run before other incoming hooks
580 # force autobuild hook to run before other incoming hooks
578 priority.incoming.autobuild = 1
581 priority.incoming.autobuild = 1
579
582
580 Most hooks are run with environment variables set that give useful
583 Most hooks are run with environment variables set that give useful
581 additional information. For each hook below, the environment
584 additional information. For each hook below, the environment
582 variables it is passed are listed with names of the form ``$HG_foo``.
585 variables it is passed are listed with names of the form ``$HG_foo``.
583
586
584 ``changegroup``
587 ``changegroup``
585 Run after a changegroup has been added via push, pull or unbundle.
588 Run after a changegroup has been added via push, pull or unbundle.
586 ID of the first new changeset is in ``$HG_NODE``. URL from which
589 ID of the first new changeset is in ``$HG_NODE``. URL from which
587 changes came is in ``$HG_URL``.
590 changes came is in ``$HG_URL``.
588
591
589 ``commit``
592 ``commit``
590 Run after a changeset has been created in the local repository. ID
593 Run after a changeset has been created in the local repository. ID
591 of the newly created changeset is in ``$HG_NODE``. Parent changeset
594 of the newly created changeset is in ``$HG_NODE``. Parent changeset
592 IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
595 IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
593
596
594 ``incoming``
597 ``incoming``
595 Run after a changeset has been pulled, pushed, or unbundled into
598 Run after a changeset has been pulled, pushed, or unbundled into
596 the local repository. The ID of the newly arrived changeset is in
599 the local repository. The ID of the newly arrived changeset is in
597 ``$HG_NODE``. URL that was source of changes came is in ``$HG_URL``.
600 ``$HG_NODE``. URL that was source of changes came is in ``$HG_URL``.
598
601
599 ``outgoing``
602 ``outgoing``
600 Run after sending changes from local repository to another. ID of
603 Run after sending changes from local repository to another. ID of
601 first changeset sent is in ``$HG_NODE``. Source of operation is in
604 first changeset sent is in ``$HG_NODE``. Source of operation is in
602 ``$HG_SOURCE``; see "preoutgoing" hook for description.
605 ``$HG_SOURCE``; see "preoutgoing" hook for description.
603
606
604 ``post-<command>``
607 ``post-<command>``
605 Run after successful invocations of the associated command. The
608 Run after successful invocations of the associated command. The
606 contents of the command line are passed as ``$HG_ARGS`` and the result
609 contents of the command line are passed as ``$HG_ARGS`` and the result
607 code in ``$HG_RESULT``. Parsed command line arguments are passed as
610 code in ``$HG_RESULT``. Parsed command line arguments are passed as
608 ``$HG_PATS`` and ``$HG_OPTS``. These contain string representations of
611 ``$HG_PATS`` and ``$HG_OPTS``. These contain string representations of
609 the python data internally passed to <command>. ``$HG_OPTS`` is a
612 the python data internally passed to <command>. ``$HG_OPTS`` is a
610 dictionary of options (with unspecified options set to their defaults).
613 dictionary of options (with unspecified options set to their defaults).
611 ``$HG_PATS`` is a list of arguments. Hook failure is ignored.
614 ``$HG_PATS`` is a list of arguments. Hook failure is ignored.
612
615
613 ``pre-<command>``
616 ``pre-<command>``
614 Run before executing the associated command. The contents of the
617 Run before executing the associated command. The contents of the
615 command line are passed as ``$HG_ARGS``. Parsed command line arguments
618 command line are passed as ``$HG_ARGS``. Parsed command line arguments
616 are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain string
619 are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain string
617 representations of the data internally passed to <command>. ``$HG_OPTS``
620 representations of the data internally passed to <command>. ``$HG_OPTS``
618 is a dictionary of options (with unspecified options set to their
621 is a dictionary of options (with unspecified options set to their
619 defaults). ``$HG_PATS`` is a list of arguments. If the hook returns
622 defaults). ``$HG_PATS`` is a list of arguments. If the hook returns
620 failure, the command doesn't execute and Mercurial returns the failure
623 failure, the command doesn't execute and Mercurial returns the failure
621 code.
624 code.
622
625
623 ``prechangegroup``
626 ``prechangegroup``
624 Run before a changegroup is added via push, pull or unbundle. Exit
627 Run before a changegroup is added via push, pull or unbundle. Exit
625 status 0 allows the changegroup to proceed. Non-zero status will
628 status 0 allows the changegroup to proceed. Non-zero status will
626 cause the push, pull or unbundle to fail. URL from which changes
629 cause the push, pull or unbundle to fail. URL from which changes
627 will come is in ``$HG_URL``.
630 will come is in ``$HG_URL``.
628
631
629 ``precommit``
632 ``precommit``
630 Run before starting a local commit. Exit status 0 allows the
633 Run before starting a local commit. Exit status 0 allows the
631 commit to proceed. Non-zero status will cause the commit to fail.
634 commit to proceed. Non-zero status will cause the commit to fail.
632 Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
635 Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
633
636
634 ``prelistkeys``
637 ``prelistkeys``
635 Run before listing pushkeys (like bookmarks) in the
638 Run before listing pushkeys (like bookmarks) in the
636 repository. Non-zero status will cause failure. The key namespace is
639 repository. Non-zero status will cause failure. The key namespace is
637 in ``$HG_NAMESPACE``.
640 in ``$HG_NAMESPACE``.
638
641
639 ``preoutgoing``
642 ``preoutgoing``
640 Run before collecting changes to send from the local repository to
643 Run before collecting changes to send from the local repository to
641 another. Non-zero status will cause failure. This lets you prevent
644 another. Non-zero status will cause failure. This lets you prevent
642 pull over HTTP or SSH. Also prevents against local pull, push
645 pull over HTTP or SSH. Also prevents against local pull, push
643 (outbound) or bundle commands, but not effective, since you can
646 (outbound) or bundle commands, but not effective, since you can
644 just copy files instead then. Source of operation is in
647 just copy files instead then. Source of operation is in
645 ``$HG_SOURCE``. If "serve", operation is happening on behalf of remote
648 ``$HG_SOURCE``. If "serve", operation is happening on behalf of remote
646 SSH or HTTP repository. If "push", "pull" or "bundle", operation
649 SSH or HTTP repository. If "push", "pull" or "bundle", operation
647 is happening on behalf of repository on same system.
650 is happening on behalf of repository on same system.
648
651
649 ``prepushkey``
652 ``prepushkey``
650 Run before a pushkey (like a bookmark) is added to the
653 Run before a pushkey (like a bookmark) is added to the
651 repository. Non-zero status will cause the key to be rejected. The
654 repository. Non-zero status will cause the key to be rejected. The
652 key namespace is in ``$HG_NAMESPACE``, the key is in ``$HG_KEY``,
655 key namespace is in ``$HG_NAMESPACE``, the key is in ``$HG_KEY``,
653 the old value (if any) is in ``$HG_OLD``, and the new value is in
656 the old value (if any) is in ``$HG_OLD``, and the new value is in
654 ``$HG_NEW``.
657 ``$HG_NEW``.
655
658
656 ``pretag``
659 ``pretag``
657 Run before creating a tag. Exit status 0 allows the tag to be
660 Run before creating a tag. Exit status 0 allows the tag to be
658 created. Non-zero status will cause the tag to fail. ID of
661 created. Non-zero status will cause the tag to fail. ID of
659 changeset to tag is in ``$HG_NODE``. Name of tag is in ``$HG_TAG``. Tag is
662 changeset to tag is in ``$HG_NODE``. Name of tag is in ``$HG_TAG``. Tag is
660 local if ``$HG_LOCAL=1``, in repository if ``$HG_LOCAL=0``.
663 local if ``$HG_LOCAL=1``, in repository if ``$HG_LOCAL=0``.
661
664
662 ``pretxnchangegroup``
665 ``pretxnchangegroup``
663 Run after a changegroup has been added via push, pull or unbundle,
666 Run after a changegroup has been added via push, pull or unbundle,
664 but before the transaction has been committed. Changegroup is
667 but before the transaction has been committed. Changegroup is
665 visible to hook program. This lets you validate incoming changes
668 visible to hook program. This lets you validate incoming changes
666 before accepting them. Passed the ID of the first new changeset in
669 before accepting them. Passed the ID of the first new changeset in
667 ``$HG_NODE``. Exit status 0 allows the transaction to commit. Non-zero
670 ``$HG_NODE``. Exit status 0 allows the transaction to commit. Non-zero
668 status will cause the transaction to be rolled back and the push,
671 status will cause the transaction to be rolled back and the push,
669 pull or unbundle will fail. URL that was source of changes is in
672 pull or unbundle will fail. URL that was source of changes is in
670 ``$HG_URL``.
673 ``$HG_URL``.
671
674
672 ``pretxncommit``
675 ``pretxncommit``
673 Run after a changeset has been created but the transaction not yet
676 Run after a changeset has been created but the transaction not yet
674 committed. Changeset is visible to hook program. This lets you
677 committed. Changeset is visible to hook program. This lets you
675 validate commit message and changes. Exit status 0 allows the
678 validate commit message and changes. Exit status 0 allows the
676 commit to proceed. Non-zero status will cause the transaction to
679 commit to proceed. Non-zero status will cause the transaction to
677 be rolled back. ID of changeset is in ``$HG_NODE``. Parent changeset
680 be rolled back. ID of changeset is in ``$HG_NODE``. Parent changeset
678 IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
681 IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``.
679
682
680 ``preupdate``
683 ``preupdate``
681 Run before updating the working directory. Exit status 0 allows
684 Run before updating the working directory. Exit status 0 allows
682 the update to proceed. Non-zero status will prevent the update.
685 the update to proceed. Non-zero status will prevent the update.
683 Changeset ID of first new parent is in ``$HG_PARENT1``. If merge, ID
686 Changeset ID of first new parent is in ``$HG_PARENT1``. If merge, ID
684 of second new parent is in ``$HG_PARENT2``.
687 of second new parent is in ``$HG_PARENT2``.
685
688
686 ``listkeys``
689 ``listkeys``
687 Run after listing pushkeys (like bookmarks) in the repository. The
690 Run after listing pushkeys (like bookmarks) in the repository. The
688 key namespace is in ``$HG_NAMESPACE``. ``$HG_VALUES`` is a
691 key namespace is in ``$HG_NAMESPACE``. ``$HG_VALUES`` is a
689 dictionary containing the keys and values.
692 dictionary containing the keys and values.
690
693
691 ``pushkey``
694 ``pushkey``
692 Run after a pushkey (like a bookmark) is added to the
695 Run after a pushkey (like a bookmark) is added to the
693 repository. The key namespace is in ``$HG_NAMESPACE``, the key is in
696 repository. The key namespace is in ``$HG_NAMESPACE``, the key is in
694 ``$HG_KEY``, the old value (if any) is in ``$HG_OLD``, and the new
697 ``$HG_KEY``, the old value (if any) is in ``$HG_OLD``, and the new
695 value is in ``$HG_NEW``.
698 value is in ``$HG_NEW``.
696
699
697 ``tag``
700 ``tag``
698 Run after a tag is created. ID of tagged changeset is in ``$HG_NODE``.
701 Run after a tag is created. ID of tagged changeset is in ``$HG_NODE``.
699 Name of tag is in ``$HG_TAG``. Tag is local if ``$HG_LOCAL=1``, in
702 Name of tag is in ``$HG_TAG``. Tag is local if ``$HG_LOCAL=1``, in
700 repository if ``$HG_LOCAL=0``.
703 repository if ``$HG_LOCAL=0``.
701
704
702 ``update``
705 ``update``
703 Run after updating the working directory. Changeset ID of first
706 Run after updating the working directory. Changeset ID of first
704 new parent is in ``$HG_PARENT1``. If merge, ID of second new parent is
707 new parent is in ``$HG_PARENT1``. If merge, ID of second new parent is
705 in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the
708 in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the
706 update failed (e.g. because conflicts not resolved), ``$HG_ERROR=1``.
709 update failed (e.g. because conflicts not resolved), ``$HG_ERROR=1``.
707
710
708 .. note:: It is generally better to use standard hooks rather than the
711 .. note:: It is generally better to use standard hooks rather than the
709 generic pre- and post- command hooks as they are guaranteed to be
712 generic pre- and post- command hooks as they are guaranteed to be
710 called in the appropriate contexts for influencing transactions.
713 called in the appropriate contexts for influencing transactions.
711 Also, hooks like "commit" will be called in all contexts that
714 Also, hooks like "commit" will be called in all contexts that
712 generate a commit (e.g. tag) and not just the commit command.
715 generate a commit (e.g. tag) and not just the commit command.
713
716
714 .. note:: Environment variables with empty values may not be passed to
717 .. note:: Environment variables with empty values may not be passed to
715 hooks on platforms such as Windows. As an example, ``$HG_PARENT2``
718 hooks on platforms such as Windows. As an example, ``$HG_PARENT2``
716 will have an empty value under Unix-like platforms for non-merge
719 will have an empty value under Unix-like platforms for non-merge
717 changesets, while it will not be available at all under Windows.
720 changesets, while it will not be available at all under Windows.
718
721
719 The syntax for Python hooks is as follows::
722 The syntax for Python hooks is as follows::
720
723
721 hookname = python:modulename.submodule.callable
724 hookname = python:modulename.submodule.callable
722 hookname = python:/path/to/python/module.py:callable
725 hookname = python:/path/to/python/module.py:callable
723
726
724 Python hooks are run within the Mercurial process. Each hook is
727 Python hooks are run within the Mercurial process. Each hook is
725 called with at least three keyword arguments: a ui object (keyword
728 called with at least three keyword arguments: a ui object (keyword
726 ``ui``), a repository object (keyword ``repo``), and a ``hooktype``
729 ``ui``), a repository object (keyword ``repo``), and a ``hooktype``
727 keyword that tells what kind of hook is used. Arguments listed as
730 keyword that tells what kind of hook is used. Arguments listed as
728 environment variables above are passed as keyword arguments, with no
731 environment variables above are passed as keyword arguments, with no
729 ``HG_`` prefix, and names in lower case.
732 ``HG_`` prefix, and names in lower case.
730
733
731 If a Python hook returns a "true" value or raises an exception, this
734 If a Python hook returns a "true" value or raises an exception, this
732 is treated as a failure.
735 is treated as a failure.
733
736
734
737
735 ``hostfingerprints``
738 ``hostfingerprints``
736 --------------------
739 --------------------
737
740
738 Fingerprints of the certificates of known HTTPS servers.
741 Fingerprints of the certificates of known HTTPS servers.
739 A HTTPS connection to a server with a fingerprint configured here will
742 A HTTPS connection to a server with a fingerprint configured here will
740 only succeed if the servers certificate matches the fingerprint.
743 only succeed if the servers certificate matches the fingerprint.
741 This is very similar to how ssh known hosts works.
744 This is very similar to how ssh known hosts works.
742 The fingerprint is the SHA-1 hash value of the DER encoded certificate.
745 The fingerprint is the SHA-1 hash value of the DER encoded certificate.
743 The CA chain and web.cacerts is not used for servers with a fingerprint.
746 The CA chain and web.cacerts is not used for servers with a fingerprint.
744
747
745 For example::
748 For example::
746
749
747 [hostfingerprints]
750 [hostfingerprints]
748 hg.intevation.org = 44:ed:af:1f:97:11:b6:01:7a:48:45:fc:10:3c:b7:f9:d4:89:2a:9d
751 hg.intevation.org = 44:ed:af:1f:97:11:b6:01:7a:48:45:fc:10:3c:b7:f9:d4:89:2a:9d
749
752
750 This feature is only supported when using Python 2.6 or later.
753 This feature is only supported when using Python 2.6 or later.
751
754
752
755
753 ``http_proxy``
756 ``http_proxy``
754 --------------
757 --------------
755
758
756 Used to access web-based Mercurial repositories through a HTTP
759 Used to access web-based Mercurial repositories through a HTTP
757 proxy.
760 proxy.
758
761
759 ``host``
762 ``host``
760 Host name and (optional) port of the proxy server, for example
763 Host name and (optional) port of the proxy server, for example
761 "myproxy:8000".
764 "myproxy:8000".
762
765
763 ``no``
766 ``no``
764 Optional. Comma-separated list of host names that should bypass
767 Optional. Comma-separated list of host names that should bypass
765 the proxy.
768 the proxy.
766
769
767 ``passwd``
770 ``passwd``
768 Optional. Password to authenticate with at the proxy server.
771 Optional. Password to authenticate with at the proxy server.
769
772
770 ``user``
773 ``user``
771 Optional. User name to authenticate with at the proxy server.
774 Optional. User name to authenticate with at the proxy server.
772
775
773 ``always``
776 ``always``
774 Optional. Always use the proxy, even for localhost and any entries
777 Optional. Always use the proxy, even for localhost and any entries
775 in ``http_proxy.no``. True or False. Default: False.
778 in ``http_proxy.no``. True or False. Default: False.
776
779
777 ``merge-patterns``
780 ``merge-patterns``
778 ------------------
781 ------------------
779
782
780 This section specifies merge tools to associate with particular file
783 This section specifies merge tools to associate with particular file
781 patterns. Tools matched here will take precedence over the default
784 patterns. Tools matched here will take precedence over the default
782 merge tool. Patterns are globs by default, rooted at the repository
785 merge tool. Patterns are globs by default, rooted at the repository
783 root.
786 root.
784
787
785 Example::
788 Example::
786
789
787 [merge-patterns]
790 [merge-patterns]
788 **.c = kdiff3
791 **.c = kdiff3
789 **.jpg = myimgmerge
792 **.jpg = myimgmerge
790
793
791 ``merge-tools``
794 ``merge-tools``
792 ---------------
795 ---------------
793
796
794 This section configures external merge tools to use for file-level
797 This section configures external merge tools to use for file-level
795 merges.
798 merges.
796
799
797 Example ``~/.hgrc``::
800 Example ``~/.hgrc``::
798
801
799 [merge-tools]
802 [merge-tools]
800 # Override stock tool location
803 # Override stock tool location
801 kdiff3.executable = ~/bin/kdiff3
804 kdiff3.executable = ~/bin/kdiff3
802 # Specify command line
805 # Specify command line
803 kdiff3.args = $base $local $other -o $output
806 kdiff3.args = $base $local $other -o $output
804 # Give higher priority
807 # Give higher priority
805 kdiff3.priority = 1
808 kdiff3.priority = 1
806
809
807 # Define new tool
810 # Define new tool
808 myHtmlTool.args = -m $local $other $base $output
811 myHtmlTool.args = -m $local $other $base $output
809 myHtmlTool.regkey = Software\FooSoftware\HtmlMerge
812 myHtmlTool.regkey = Software\FooSoftware\HtmlMerge
810 myHtmlTool.priority = 1
813 myHtmlTool.priority = 1
811
814
812 Supported arguments:
815 Supported arguments:
813
816
814 ``priority``
817 ``priority``
815 The priority in which to evaluate this tool.
818 The priority in which to evaluate this tool.
816 Default: 0.
819 Default: 0.
817
820
818 ``executable``
821 ``executable``
819 Either just the name of the executable or its pathname. On Windows,
822 Either just the name of the executable or its pathname. On Windows,
820 the path can use environment variables with ${ProgramFiles} syntax.
823 the path can use environment variables with ${ProgramFiles} syntax.
821 Default: the tool name.
824 Default: the tool name.
822
825
823 ``args``
826 ``args``
824 The arguments to pass to the tool executable. You can refer to the
827 The arguments to pass to the tool executable. You can refer to the
825 files being merged as well as the output file through these
828 files being merged as well as the output file through these
826 variables: ``$base``, ``$local``, ``$other``, ``$output``.
829 variables: ``$base``, ``$local``, ``$other``, ``$output``.
827 Default: ``$local $base $other``
830 Default: ``$local $base $other``
828
831
829 ``premerge``
832 ``premerge``
830 Attempt to run internal non-interactive 3-way merge tool before
833 Attempt to run internal non-interactive 3-way merge tool before
831 launching external tool. Options are ``true``, ``false``, or ``keep``
834 launching external tool. Options are ``true``, ``false``, or ``keep``
832 to leave markers in the file if the premerge fails.
835 to leave markers in the file if the premerge fails.
833 Default: True
836 Default: True
834
837
835 ``binary``
838 ``binary``
836 This tool can merge binary files. Defaults to False, unless tool
839 This tool can merge binary files. Defaults to False, unless tool
837 was selected by file pattern match.
840 was selected by file pattern match.
838
841
839 ``symlink``
842 ``symlink``
840 This tool can merge symlinks. Defaults to False, even if tool was
843 This tool can merge symlinks. Defaults to False, even if tool was
841 selected by file pattern match.
844 selected by file pattern match.
842
845
843 ``check``
846 ``check``
844 A list of merge success-checking options:
847 A list of merge success-checking options:
845
848
846 ``changed``
849 ``changed``
847 Ask whether merge was successful when the merged file shows no changes.
850 Ask whether merge was successful when the merged file shows no changes.
848 ``conflicts``
851 ``conflicts``
849 Check whether there are conflicts even though the tool reported success.
852 Check whether there are conflicts even though the tool reported success.
850 ``prompt``
853 ``prompt``
851 Always prompt for merge success, regardless of success reported by tool.
854 Always prompt for merge success, regardless of success reported by tool.
852
855
853 ``fixeol``
856 ``fixeol``
854 Attempt to fix up EOL changes caused by the merge tool.
857 Attempt to fix up EOL changes caused by the merge tool.
855 Default: False
858 Default: False
856
859
857 ``gui``
860 ``gui``
858 This tool requires a graphical interface to run. Default: False
861 This tool requires a graphical interface to run. Default: False
859
862
860 ``regkey``
863 ``regkey``
861 Windows registry key which describes install location of this
864 Windows registry key which describes install location of this
862 tool. Mercurial will search for this key first under
865 tool. Mercurial will search for this key first under
863 ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``.
866 ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``.
864 Default: None
867 Default: None
865
868
866 ``regkeyalt``
869 ``regkeyalt``
867 An alternate Windows registry key to try if the first key is not
870 An alternate Windows registry key to try if the first key is not
868 found. The alternate key uses the same ``regname`` and ``regappend``
871 found. The alternate key uses the same ``regname`` and ``regappend``
869 semantics of the primary key. The most common use for this key
872 semantics of the primary key. The most common use for this key
870 is to search for 32bit applications on 64bit operating systems.
873 is to search for 32bit applications on 64bit operating systems.
871 Default: None
874 Default: None
872
875
873 ``regname``
876 ``regname``
874 Name of value to read from specified registry key. Defaults to the
877 Name of value to read from specified registry key. Defaults to the
875 unnamed (default) value.
878 unnamed (default) value.
876
879
877 ``regappend``
880 ``regappend``
878 String to append to the value read from the registry, typically
881 String to append to the value read from the registry, typically
879 the executable name of the tool.
882 the executable name of the tool.
880 Default: None
883 Default: None
881
884
882
885
883 ``patch``
886 ``patch``
884 ---------
887 ---------
885
888
886 Settings used when applying patches, for instance through the 'import'
889 Settings used when applying patches, for instance through the 'import'
887 command or with Mercurial Queues extension.
890 command or with Mercurial Queues extension.
888
891
889 ``eol``
892 ``eol``
890 When set to 'strict' patch content and patched files end of lines
893 When set to 'strict' patch content and patched files end of lines
891 are preserved. When set to ``lf`` or ``crlf``, both files end of
894 are preserved. When set to ``lf`` or ``crlf``, both files end of
892 lines are ignored when patching and the result line endings are
895 lines are ignored when patching and the result line endings are
893 normalized to either LF (Unix) or CRLF (Windows). When set to
896 normalized to either LF (Unix) or CRLF (Windows). When set to
894 ``auto``, end of lines are again ignored while patching but line
897 ``auto``, end of lines are again ignored while patching but line
895 endings in patched files are normalized to their original setting
898 endings in patched files are normalized to their original setting
896 on a per-file basis. If target file does not exist or has no end
899 on a per-file basis. If target file does not exist or has no end
897 of line, patch line endings are preserved.
900 of line, patch line endings are preserved.
898 Default: strict.
901 Default: strict.
899
902
900
903
901 ``paths``
904 ``paths``
902 ---------
905 ---------
903
906
904 Assigns symbolic names to repositories. The left side is the
907 Assigns symbolic names to repositories. The left side is the
905 symbolic name, and the right gives the directory or URL that is the
908 symbolic name, and the right gives the directory or URL that is the
906 location of the repository. Default paths can be declared by setting
909 location of the repository. Default paths can be declared by setting
907 the following entries.
910 the following entries.
908
911
909 ``default``
912 ``default``
910 Directory or URL to use when pulling if no source is specified.
913 Directory or URL to use when pulling if no source is specified.
911 Default is set to repository from which the current repository was
914 Default is set to repository from which the current repository was
912 cloned.
915 cloned.
913
916
914 ``default-push``
917 ``default-push``
915 Optional. Directory or URL to use when pushing if no destination
918 Optional. Directory or URL to use when pushing if no destination
916 is specified.
919 is specified.
917
920
918 Custom paths can be defined by assigning the path to a name that later can be
921 Custom paths can be defined by assigning the path to a name that later can be
919 used from the command line. Example::
922 used from the command line. Example::
920
923
921 [paths]
924 [paths]
922 my_path = http://example.com/path
925 my_path = http://example.com/path
923
926
924 To push to the path defined in ``my_path`` run the command::
927 To push to the path defined in ``my_path`` run the command::
925
928
926 hg push my_path
929 hg push my_path
927
930
928
931
929 ``phases``
932 ``phases``
930 ----------
933 ----------
931
934
932 Specifies default handling of phases. See :hg:`help phases` for more
935 Specifies default handling of phases. See :hg:`help phases` for more
933 information about working with phases.
936 information about working with phases.
934
937
935 ``publish``
938 ``publish``
936 Controls draft phase behavior when working as a server. When true,
939 Controls draft phase behavior when working as a server. When true,
937 pushed changesets are set to public in both client and server and
940 pushed changesets are set to public in both client and server and
938 pulled or cloned changesets are set to public in the client.
941 pulled or cloned changesets are set to public in the client.
939 Default: True
942 Default: True
940
943
941 ``new-commit``
944 ``new-commit``
942 Phase of newly-created commits.
945 Phase of newly-created commits.
943 Default: draft
946 Default: draft
944
947
945 ``profiling``
948 ``profiling``
946 -------------
949 -------------
947
950
948 Specifies profiling type, format, and file output. Two profilers are
951 Specifies profiling type, format, and file output. Two profilers are
949 supported: an instrumenting profiler (named ``ls``), and a sampling
952 supported: an instrumenting profiler (named ``ls``), and a sampling
950 profiler (named ``stat``).
953 profiler (named ``stat``).
951
954
952 In this section description, 'profiling data' stands for the raw data
955 In this section description, 'profiling data' stands for the raw data
953 collected during profiling, while 'profiling report' stands for a
956 collected during profiling, while 'profiling report' stands for a
954 statistical text report generated from the profiling data. The
957 statistical text report generated from the profiling data. The
955 profiling is done using lsprof.
958 profiling is done using lsprof.
956
959
957 ``type``
960 ``type``
958 The type of profiler to use.
961 The type of profiler to use.
959 Default: ls.
962 Default: ls.
960
963
961 ``ls``
964 ``ls``
962 Use Python's built-in instrumenting profiler. This profiler
965 Use Python's built-in instrumenting profiler. This profiler
963 works on all platforms, but each line number it reports is the
966 works on all platforms, but each line number it reports is the
964 first line of a function. This restriction makes it difficult to
967 first line of a function. This restriction makes it difficult to
965 identify the expensive parts of a non-trivial function.
968 identify the expensive parts of a non-trivial function.
966 ``stat``
969 ``stat``
967 Use a third-party statistical profiler, statprof. This profiler
970 Use a third-party statistical profiler, statprof. This profiler
968 currently runs only on Unix systems, and is most useful for
971 currently runs only on Unix systems, and is most useful for
969 profiling commands that run for longer than about 0.1 seconds.
972 profiling commands that run for longer than about 0.1 seconds.
970
973
971 ``format``
974 ``format``
972 Profiling format. Specific to the ``ls`` instrumenting profiler.
975 Profiling format. Specific to the ``ls`` instrumenting profiler.
973 Default: text.
976 Default: text.
974
977
975 ``text``
978 ``text``
976 Generate a profiling report. When saving to a file, it should be
979 Generate a profiling report. When saving to a file, it should be
977 noted that only the report is saved, and the profiling data is
980 noted that only the report is saved, and the profiling data is
978 not kept.
981 not kept.
979 ``kcachegrind``
982 ``kcachegrind``
980 Format profiling data for kcachegrind use: when saving to a
983 Format profiling data for kcachegrind use: when saving to a
981 file, the generated file can directly be loaded into
984 file, the generated file can directly be loaded into
982 kcachegrind.
985 kcachegrind.
983
986
984 ``frequency``
987 ``frequency``
985 Sampling frequency. Specific to the ``stat`` sampling profiler.
988 Sampling frequency. Specific to the ``stat`` sampling profiler.
986 Default: 1000.
989 Default: 1000.
987
990
988 ``output``
991 ``output``
989 File path where profiling data or report should be saved. If the
992 File path where profiling data or report should be saved. If the
990 file exists, it is replaced. Default: None, data is printed on
993 file exists, it is replaced. Default: None, data is printed on
991 stderr
994 stderr
992
995
993 ``sort``
996 ``sort``
994 Sort field. Specific to the ``ls`` instrumenting profiler.
997 Sort field. Specific to the ``ls`` instrumenting profiler.
995 One of ``callcount``, ``reccallcount``, ``totaltime`` and
998 One of ``callcount``, ``reccallcount``, ``totaltime`` and
996 ``inlinetime``.
999 ``inlinetime``.
997 Default: inlinetime.
1000 Default: inlinetime.
998
1001
999 ``limit``
1002 ``limit``
1000 Number of lines to show. Specific to the ``ls`` instrumenting profiler.
1003 Number of lines to show. Specific to the ``ls`` instrumenting profiler.
1001 Default: 30.
1004 Default: 30.
1002
1005
1003 ``nested``
1006 ``nested``
1004 Show at most this number of lines of drill-down info after each main entry.
1007 Show at most this number of lines of drill-down info after each main entry.
1005 This can help explain the difference between Total and Inline.
1008 This can help explain the difference between Total and Inline.
1006 Specific to the ``ls`` instrumenting profiler.
1009 Specific to the ``ls`` instrumenting profiler.
1007 Default: 5.
1010 Default: 5.
1008
1011
1009 ``revsetalias``
1012 ``revsetalias``
1010 ---------------
1013 ---------------
1011
1014
1012 Alias definitions for revsets. See :hg:`help revsets` for details.
1015 Alias definitions for revsets. See :hg:`help revsets` for details.
1013
1016
1014 ``server``
1017 ``server``
1015 ----------
1018 ----------
1016
1019
1017 Controls generic server settings.
1020 Controls generic server settings.
1018
1021
1019 ``uncompressed``
1022 ``uncompressed``
1020 Whether to allow clients to clone a repository using the
1023 Whether to allow clients to clone a repository using the
1021 uncompressed streaming protocol. This transfers about 40% more
1024 uncompressed streaming protocol. This transfers about 40% more
1022 data than a regular clone, but uses less memory and CPU on both
1025 data than a regular clone, but uses less memory and CPU on both
1023 server and client. Over a LAN (100 Mbps or better) or a very fast
1026 server and client. Over a LAN (100 Mbps or better) or a very fast
1024 WAN, an uncompressed streaming clone is a lot faster (~10x) than a
1027 WAN, an uncompressed streaming clone is a lot faster (~10x) than a
1025 regular clone. Over most WAN connections (anything slower than
1028 regular clone. Over most WAN connections (anything slower than
1026 about 6 Mbps), uncompressed streaming is slower, because of the
1029 about 6 Mbps), uncompressed streaming is slower, because of the
1027 extra data transfer overhead. This mode will also temporarily hold
1030 extra data transfer overhead. This mode will also temporarily hold
1028 the write lock while determining what data to transfer.
1031 the write lock while determining what data to transfer.
1029 Default is True.
1032 Default is True.
1030
1033
1031 ``preferuncompressed``
1034 ``preferuncompressed``
1032 When set, clients will try to use the uncompressed streaming
1035 When set, clients will try to use the uncompressed streaming
1033 protocol. Default is False.
1036 protocol. Default is False.
1034
1037
1035 ``validate``
1038 ``validate``
1036 Whether to validate the completeness of pushed changesets by
1039 Whether to validate the completeness of pushed changesets by
1037 checking that all new file revisions specified in manifests are
1040 checking that all new file revisions specified in manifests are
1038 present. Default is False.
1041 present. Default is False.
1039
1042
1040 ``smtp``
1043 ``smtp``
1041 --------
1044 --------
1042
1045
1043 Configuration for extensions that need to send email messages.
1046 Configuration for extensions that need to send email messages.
1044
1047
1045 ``host``
1048 ``host``
1046 Host name of mail server, e.g. "mail.example.com".
1049 Host name of mail server, e.g. "mail.example.com".
1047
1050
1048 ``port``
1051 ``port``
1049 Optional. Port to connect to on mail server. Default: 465 (if
1052 Optional. Port to connect to on mail server. Default: 465 (if
1050 ``tls`` is smtps) or 25 (otherwise).
1053 ``tls`` is smtps) or 25 (otherwise).
1051
1054
1052 ``tls``
1055 ``tls``
1053 Optional. Method to enable TLS when connecting to mail server: starttls,
1056 Optional. Method to enable TLS when connecting to mail server: starttls,
1054 smtps or none. Default: none.
1057 smtps or none. Default: none.
1055
1058
1056 ``verifycert``
1059 ``verifycert``
1057 Optional. Verification for the certificate of mail server, when
1060 Optional. Verification for the certificate of mail server, when
1058 ``tls`` is starttls or smtps. "strict", "loose" or False. For
1061 ``tls`` is starttls or smtps. "strict", "loose" or False. For
1059 "strict" or "loose", the certificate is verified as same as the
1062 "strict" or "loose", the certificate is verified as same as the
1060 verification for HTTPS connections (see ``[hostfingerprints]`` and
1063 verification for HTTPS connections (see ``[hostfingerprints]`` and
1061 ``[web] cacerts`` also). For "strict", sending email is also
1064 ``[web] cacerts`` also). For "strict", sending email is also
1062 aborted, if there is no configuration for mail server in
1065 aborted, if there is no configuration for mail server in
1063 ``[hostfingerprints]`` and ``[web] cacerts``. --insecure for
1066 ``[hostfingerprints]`` and ``[web] cacerts``. --insecure for
1064 :hg:`email` overwrites this as "loose". Default: "strict".
1067 :hg:`email` overwrites this as "loose". Default: "strict".
1065
1068
1066 ``username``
1069 ``username``
1067 Optional. User name for authenticating with the SMTP server.
1070 Optional. User name for authenticating with the SMTP server.
1068 Default: none.
1071 Default: none.
1069
1072
1070 ``password``
1073 ``password``
1071 Optional. Password for authenticating with the SMTP server. If not
1074 Optional. Password for authenticating with the SMTP server. If not
1072 specified, interactive sessions will prompt the user for a
1075 specified, interactive sessions will prompt the user for a
1073 password; non-interactive sessions will fail. Default: none.
1076 password; non-interactive sessions will fail. Default: none.
1074
1077
1075 ``local_hostname``
1078 ``local_hostname``
1076 Optional. It's the hostname that the sender can use to identify
1079 Optional. It's the hostname that the sender can use to identify
1077 itself to the MTA.
1080 itself to the MTA.
1078
1081
1079
1082
1080 ``subpaths``
1083 ``subpaths``
1081 ------------
1084 ------------
1082
1085
1083 Subrepository source URLs can go stale if a remote server changes name
1086 Subrepository source URLs can go stale if a remote server changes name
1084 or becomes temporarily unavailable. This section lets you define
1087 or becomes temporarily unavailable. This section lets you define
1085 rewrite rules of the form::
1088 rewrite rules of the form::
1086
1089
1087 <pattern> = <replacement>
1090 <pattern> = <replacement>
1088
1091
1089 where ``pattern`` is a regular expression matching a subrepository
1092 where ``pattern`` is a regular expression matching a subrepository
1090 source URL and ``replacement`` is the replacement string used to
1093 source URL and ``replacement`` is the replacement string used to
1091 rewrite it. Groups can be matched in ``pattern`` and referenced in
1094 rewrite it. Groups can be matched in ``pattern`` and referenced in
1092 ``replacements``. For instance::
1095 ``replacements``. For instance::
1093
1096
1094 http://server/(.*)-hg/ = http://hg.server/\1/
1097 http://server/(.*)-hg/ = http://hg.server/\1/
1095
1098
1096 rewrites ``http://server/foo-hg/`` into ``http://hg.server/foo/``.
1099 rewrites ``http://server/foo-hg/`` into ``http://hg.server/foo/``.
1097
1100
1098 Relative subrepository paths are first made absolute, and the
1101 Relative subrepository paths are first made absolute, and the
1099 rewrite rules are then applied on the full (absolute) path. The rules
1102 rewrite rules are then applied on the full (absolute) path. The rules
1100 are applied in definition order.
1103 are applied in definition order.
1101
1104
1102 ``trusted``
1105 ``trusted``
1103 -----------
1106 -----------
1104
1107
1105 Mercurial will not use the settings in the
1108 Mercurial will not use the settings in the
1106 ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted
1109 ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted
1107 user or to a trusted group, as various hgrc features allow arbitrary
1110 user or to a trusted group, as various hgrc features allow arbitrary
1108 commands to be run. This issue is often encountered when configuring
1111 commands to be run. This issue is often encountered when configuring
1109 hooks or extensions for shared repositories or servers. However,
1112 hooks or extensions for shared repositories or servers. However,
1110 the web interface will use some safe settings from the ``[web]``
1113 the web interface will use some safe settings from the ``[web]``
1111 section.
1114 section.
1112
1115
1113 This section specifies what users and groups are trusted. The
1116 This section specifies what users and groups are trusted. The
1114 current user is always trusted. To trust everybody, list a user or a
1117 current user is always trusted. To trust everybody, list a user or a
1115 group with name ``*``. These settings must be placed in an
1118 group with name ``*``. These settings must be placed in an
1116 *already-trusted file* to take effect, such as ``$HOME/.hgrc`` of the
1119 *already-trusted file* to take effect, such as ``$HOME/.hgrc`` of the
1117 user or service running Mercurial.
1120 user or service running Mercurial.
1118
1121
1119 ``users``
1122 ``users``
1120 Comma-separated list of trusted users.
1123 Comma-separated list of trusted users.
1121
1124
1122 ``groups``
1125 ``groups``
1123 Comma-separated list of trusted groups.
1126 Comma-separated list of trusted groups.
1124
1127
1125
1128
1126 ``ui``
1129 ``ui``
1127 ------
1130 ------
1128
1131
1129 User interface controls.
1132 User interface controls.
1130
1133
1131 ``archivemeta``
1134 ``archivemeta``
1132 Whether to include the .hg_archival.txt file containing meta data
1135 Whether to include the .hg_archival.txt file containing meta data
1133 (hashes for the repository base and for tip) in archives created
1136 (hashes for the repository base and for tip) in archives created
1134 by the :hg:`archive` command or downloaded via hgweb.
1137 by the :hg:`archive` command or downloaded via hgweb.
1135 Default is True.
1138 Default is True.
1136
1139
1137 ``askusername``
1140 ``askusername``
1138 Whether to prompt for a username when committing. If True, and
1141 Whether to prompt for a username when committing. If True, and
1139 neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will
1142 neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will
1140 be prompted to enter a username. If no username is entered, the
1143 be prompted to enter a username. If no username is entered, the
1141 default ``USER@HOST`` is used instead.
1144 default ``USER@HOST`` is used instead.
1142 Default is False.
1145 Default is False.
1143
1146
1144 ``commitsubrepos``
1147 ``commitsubrepos``
1145 Whether to commit modified subrepositories when committing the
1148 Whether to commit modified subrepositories when committing the
1146 parent repository. If False and one subrepository has uncommitted
1149 parent repository. If False and one subrepository has uncommitted
1147 changes, abort the commit.
1150 changes, abort the commit.
1148 Default is False.
1151 Default is False.
1149
1152
1150 ``debug``
1153 ``debug``
1151 Print debugging information. True or False. Default is False.
1154 Print debugging information. True or False. Default is False.
1152
1155
1153 ``editor``
1156 ``editor``
1154 The editor to use during a commit. Default is ``$EDITOR`` or ``vi``.
1157 The editor to use during a commit. Default is ``$EDITOR`` or ``vi``.
1155
1158
1156 ``fallbackencoding``
1159 ``fallbackencoding``
1157 Encoding to try if it's not possible to decode the changelog using
1160 Encoding to try if it's not possible to decode the changelog using
1158 UTF-8. Default is ISO-8859-1.
1161 UTF-8. Default is ISO-8859-1.
1159
1162
1160 ``ignore``
1163 ``ignore``
1161 A file to read per-user ignore patterns from. This file should be
1164 A file to read per-user ignore patterns from. This file should be
1162 in the same format as a repository-wide .hgignore file. This
1165 in the same format as a repository-wide .hgignore file. This
1163 option supports hook syntax, so if you want to specify multiple
1166 option supports hook syntax, so if you want to specify multiple
1164 ignore files, you can do so by setting something like
1167 ignore files, you can do so by setting something like
1165 ``ignore.other = ~/.hgignore2``. For details of the ignore file
1168 ``ignore.other = ~/.hgignore2``. For details of the ignore file
1166 format, see the ``hgignore(5)`` man page.
1169 format, see the ``hgignore(5)`` man page.
1167
1170
1168 ``interactive``
1171 ``interactive``
1169 Allow to prompt the user. True or False. Default is True.
1172 Allow to prompt the user. True or False. Default is True.
1170
1173
1171 ``logtemplate``
1174 ``logtemplate``
1172 Template string for commands that print changesets.
1175 Template string for commands that print changesets.
1173
1176
1174 ``merge``
1177 ``merge``
1175 The conflict resolution program to use during a manual merge.
1178 The conflict resolution program to use during a manual merge.
1176 For more information on merge tools see :hg:`help merge-tools`.
1179 For more information on merge tools see :hg:`help merge-tools`.
1177 For configuring merge tools see the ``[merge-tools]`` section.
1180 For configuring merge tools see the ``[merge-tools]`` section.
1178
1181
1179 ``portablefilenames``
1182 ``portablefilenames``
1180 Check for portable filenames. Can be ``warn``, ``ignore`` or ``abort``.
1183 Check for portable filenames. Can be ``warn``, ``ignore`` or ``abort``.
1181 Default is ``warn``.
1184 Default is ``warn``.
1182 If set to ``warn`` (or ``true``), a warning message is printed on POSIX
1185 If set to ``warn`` (or ``true``), a warning message is printed on POSIX
1183 platforms, if a file with a non-portable filename is added (e.g. a file
1186 platforms, if a file with a non-portable filename is added (e.g. a file
1184 with a name that can't be created on Windows because it contains reserved
1187 with a name that can't be created on Windows because it contains reserved
1185 parts like ``AUX``, reserved characters like ``:``, or would cause a case
1188 parts like ``AUX``, reserved characters like ``:``, or would cause a case
1186 collision with an existing file).
1189 collision with an existing file).
1187 If set to ``ignore`` (or ``false``), no warning is printed.
1190 If set to ``ignore`` (or ``false``), no warning is printed.
1188 If set to ``abort``, the command is aborted.
1191 If set to ``abort``, the command is aborted.
1189 On Windows, this configuration option is ignored and the command aborted.
1192 On Windows, this configuration option is ignored and the command aborted.
1190
1193
1191 ``quiet``
1194 ``quiet``
1192 Reduce the amount of output printed. True or False. Default is False.
1195 Reduce the amount of output printed. True or False. Default is False.
1193
1196
1194 ``remotecmd``
1197 ``remotecmd``
1195 remote command to use for clone/push/pull operations. Default is ``hg``.
1198 remote command to use for clone/push/pull operations. Default is ``hg``.
1196
1199
1197 ``reportoldssl``
1200 ``reportoldssl``
1198 Warn if an SSL certificate is unable to be due to using Python
1201 Warn if an SSL certificate is unable to be due to using Python
1199 2.5 or earlier. True or False. Default is True.
1202 2.5 or earlier. True or False. Default is True.
1200
1203
1201 ``report_untrusted``
1204 ``report_untrusted``
1202 Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a
1205 Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a
1203 trusted user or group. True or False. Default is True.
1206 trusted user or group. True or False. Default is True.
1204
1207
1205 ``slash``
1208 ``slash``
1206 Display paths using a slash (``/``) as the path separator. This
1209 Display paths using a slash (``/``) as the path separator. This
1207 only makes a difference on systems where the default path
1210 only makes a difference on systems where the default path
1208 separator is not the slash character (e.g. Windows uses the
1211 separator is not the slash character (e.g. Windows uses the
1209 backslash character (``\``)).
1212 backslash character (``\``)).
1210 Default is False.
1213 Default is False.
1211
1214
1212 ``ssh``
1215 ``ssh``
1213 command to use for SSH connections. Default is ``ssh``.
1216 command to use for SSH connections. Default is ``ssh``.
1214
1217
1215 ``strict``
1218 ``strict``
1216 Require exact command names, instead of allowing unambiguous
1219 Require exact command names, instead of allowing unambiguous
1217 abbreviations. True or False. Default is False.
1220 abbreviations. True or False. Default is False.
1218
1221
1219 ``style``
1222 ``style``
1220 Name of style to use for command output.
1223 Name of style to use for command output.
1221
1224
1222 ``timeout``
1225 ``timeout``
1223 The timeout used when a lock is held (in seconds), a negative value
1226 The timeout used when a lock is held (in seconds), a negative value
1224 means no timeout. Default is 600.
1227 means no timeout. Default is 600.
1225
1228
1226 ``traceback``
1229 ``traceback``
1227 Mercurial always prints a traceback when an unknown exception
1230 Mercurial always prints a traceback when an unknown exception
1228 occurs. Setting this to True will make Mercurial print a traceback
1231 occurs. Setting this to True will make Mercurial print a traceback
1229 on all exceptions, even those recognized by Mercurial (such as
1232 on all exceptions, even those recognized by Mercurial (such as
1230 IOError or MemoryError). Default is False.
1233 IOError or MemoryError). Default is False.
1231
1234
1232 ``username``
1235 ``username``
1233 The committer of a changeset created when running "commit".
1236 The committer of a changeset created when running "commit".
1234 Typically a person's name and email address, e.g. ``Fred Widget
1237 Typically a person's name and email address, e.g. ``Fred Widget
1235 <fred@example.com>``. Default is ``$EMAIL`` or ``username@hostname``. If
1238 <fred@example.com>``. Default is ``$EMAIL`` or ``username@hostname``. If
1236 the username in hgrc is empty, it has to be specified manually or
1239 the username in hgrc is empty, it has to be specified manually or
1237 in a different hgrc file (e.g. ``$HOME/.hgrc``, if the admin set
1240 in a different hgrc file (e.g. ``$HOME/.hgrc``, if the admin set
1238 ``username =`` in the system hgrc). Environment variables in the
1241 ``username =`` in the system hgrc). Environment variables in the
1239 username are expanded.
1242 username are expanded.
1240
1243
1241 ``verbose``
1244 ``verbose``
1242 Increase the amount of output printed. True or False. Default is False.
1245 Increase the amount of output printed. True or False. Default is False.
1243
1246
1244
1247
1245 ``web``
1248 ``web``
1246 -------
1249 -------
1247
1250
1248 Web interface configuration. The settings in this section apply to
1251 Web interface configuration. The settings in this section apply to
1249 both the builtin webserver (started by :hg:`serve`) and the script you
1252 both the builtin webserver (started by :hg:`serve`) and the script you
1250 run through a webserver (``hgweb.cgi`` and the derivatives for FastCGI
1253 run through a webserver (``hgweb.cgi`` and the derivatives for FastCGI
1251 and WSGI).
1254 and WSGI).
1252
1255
1253 The Mercurial webserver does no authentication (it does not prompt for
1256 The Mercurial webserver does no authentication (it does not prompt for
1254 usernames and passwords to validate *who* users are), but it does do
1257 usernames and passwords to validate *who* users are), but it does do
1255 authorization (it grants or denies access for *authenticated users*
1258 authorization (it grants or denies access for *authenticated users*
1256 based on settings in this section). You must either configure your
1259 based on settings in this section). You must either configure your
1257 webserver to do authentication for you, or disable the authorization
1260 webserver to do authentication for you, or disable the authorization
1258 checks.
1261 checks.
1259
1262
1260 For a quick setup in a trusted environment, e.g., a private LAN, where
1263 For a quick setup in a trusted environment, e.g., a private LAN, where
1261 you want it to accept pushes from anybody, you can use the following
1264 you want it to accept pushes from anybody, you can use the following
1262 command line::
1265 command line::
1263
1266
1264 $ hg --config web.allow_push=* --config web.push_ssl=False serve
1267 $ hg --config web.allow_push=* --config web.push_ssl=False serve
1265
1268
1266 Note that this will allow anybody to push anything to the server and
1269 Note that this will allow anybody to push anything to the server and
1267 that this should not be used for public servers.
1270 that this should not be used for public servers.
1268
1271
1269 The full set of options is:
1272 The full set of options is:
1270
1273
1271 ``accesslog``
1274 ``accesslog``
1272 Where to output the access log. Default is stdout.
1275 Where to output the access log. Default is stdout.
1273
1276
1274 ``address``
1277 ``address``
1275 Interface address to bind to. Default is all.
1278 Interface address to bind to. Default is all.
1276
1279
1277 ``allow_archive``
1280 ``allow_archive``
1278 List of archive format (bz2, gz, zip) allowed for downloading.
1281 List of archive format (bz2, gz, zip) allowed for downloading.
1279 Default is empty.
1282 Default is empty.
1280
1283
1281 ``allowbz2``
1284 ``allowbz2``
1282 (DEPRECATED) Whether to allow .tar.bz2 downloading of repository
1285 (DEPRECATED) Whether to allow .tar.bz2 downloading of repository
1283 revisions.
1286 revisions.
1284 Default is False.
1287 Default is False.
1285
1288
1286 ``allowgz``
1289 ``allowgz``
1287 (DEPRECATED) Whether to allow .tar.gz downloading of repository
1290 (DEPRECATED) Whether to allow .tar.gz downloading of repository
1288 revisions.
1291 revisions.
1289 Default is False.
1292 Default is False.
1290
1293
1291 ``allowpull``
1294 ``allowpull``
1292 Whether to allow pulling from the repository. Default is True.
1295 Whether to allow pulling from the repository. Default is True.
1293
1296
1294 ``allow_push``
1297 ``allow_push``
1295 Whether to allow pushing to the repository. If empty or not set,
1298 Whether to allow pushing to the repository. If empty or not set,
1296 push is not allowed. If the special value ``*``, any remote user can
1299 push is not allowed. If the special value ``*``, any remote user can
1297 push, including unauthenticated users. Otherwise, the remote user
1300 push, including unauthenticated users. Otherwise, the remote user
1298 must have been authenticated, and the authenticated user name must
1301 must have been authenticated, and the authenticated user name must
1299 be present in this list. The contents of the allow_push list are
1302 be present in this list. The contents of the allow_push list are
1300 examined after the deny_push list.
1303 examined after the deny_push list.
1301
1304
1302 ``allow_read``
1305 ``allow_read``
1303 If the user has not already been denied repository access due to
1306 If the user has not already been denied repository access due to
1304 the contents of deny_read, this list determines whether to grant
1307 the contents of deny_read, this list determines whether to grant
1305 repository access to the user. If this list is not empty, and the
1308 repository access to the user. If this list is not empty, and the
1306 user is unauthenticated or not present in the list, then access is
1309 user is unauthenticated or not present in the list, then access is
1307 denied for the user. If the list is empty or not set, then access
1310 denied for the user. If the list is empty or not set, then access
1308 is permitted to all users by default. Setting allow_read to the
1311 is permitted to all users by default. Setting allow_read to the
1309 special value ``*`` is equivalent to it not being set (i.e. access
1312 special value ``*`` is equivalent to it not being set (i.e. access
1310 is permitted to all users). The contents of the allow_read list are
1313 is permitted to all users). The contents of the allow_read list are
1311 examined after the deny_read list.
1314 examined after the deny_read list.
1312
1315
1313 ``allowzip``
1316 ``allowzip``
1314 (DEPRECATED) Whether to allow .zip downloading of repository
1317 (DEPRECATED) Whether to allow .zip downloading of repository
1315 revisions. Default is False. This feature creates temporary files.
1318 revisions. Default is False. This feature creates temporary files.
1316
1319
1317 ``archivesubrepos``
1320 ``archivesubrepos``
1318 Whether to recurse into subrepositories when archiving. Default is
1321 Whether to recurse into subrepositories when archiving. Default is
1319 False.
1322 False.
1320
1323
1321 ``baseurl``
1324 ``baseurl``
1322 Base URL to use when publishing URLs in other locations, so
1325 Base URL to use when publishing URLs in other locations, so
1323 third-party tools like email notification hooks can construct
1326 third-party tools like email notification hooks can construct
1324 URLs. Example: ``http://hgserver/repos/``.
1327 URLs. Example: ``http://hgserver/repos/``.
1325
1328
1326 ``cacerts``
1329 ``cacerts``
1327 Path to file containing a list of PEM encoded certificate
1330 Path to file containing a list of PEM encoded certificate
1328 authority certificates. Environment variables and ``~user``
1331 authority certificates. Environment variables and ``~user``
1329 constructs are expanded in the filename. If specified on the
1332 constructs are expanded in the filename. If specified on the
1330 client, then it will verify the identity of remote HTTPS servers
1333 client, then it will verify the identity of remote HTTPS servers
1331 with these certificates.
1334 with these certificates.
1332
1335
1333 This feature is only supported when using Python 2.6 or later. If you wish
1336 This feature is only supported when using Python 2.6 or later. If you wish
1334 to use it with earlier versions of Python, install the backported
1337 to use it with earlier versions of Python, install the backported
1335 version of the ssl library that is available from
1338 version of the ssl library that is available from
1336 ``http://pypi.python.org``.
1339 ``http://pypi.python.org``.
1337
1340
1338 To disable SSL verification temporarily, specify ``--insecure`` from
1341 To disable SSL verification temporarily, specify ``--insecure`` from
1339 command line.
1342 command line.
1340
1343
1341 You can use OpenSSL's CA certificate file if your platform has
1344 You can use OpenSSL's CA certificate file if your platform has
1342 one. On most Linux systems this will be
1345 one. On most Linux systems this will be
1343 ``/etc/ssl/certs/ca-certificates.crt``. Otherwise you will have to
1346 ``/etc/ssl/certs/ca-certificates.crt``. Otherwise you will have to
1344 generate this file manually. The form must be as follows::
1347 generate this file manually. The form must be as follows::
1345
1348
1346 -----BEGIN CERTIFICATE-----
1349 -----BEGIN CERTIFICATE-----
1347 ... (certificate in base64 PEM encoding) ...
1350 ... (certificate in base64 PEM encoding) ...
1348 -----END CERTIFICATE-----
1351 -----END CERTIFICATE-----
1349 -----BEGIN CERTIFICATE-----
1352 -----BEGIN CERTIFICATE-----
1350 ... (certificate in base64 PEM encoding) ...
1353 ... (certificate in base64 PEM encoding) ...
1351 -----END CERTIFICATE-----
1354 -----END CERTIFICATE-----
1352
1355
1353 ``cache``
1356 ``cache``
1354 Whether to support caching in hgweb. Defaults to True.
1357 Whether to support caching in hgweb. Defaults to True.
1355
1358
1356 ``collapse``
1359 ``collapse``
1357 With ``descend`` enabled, repositories in subdirectories are shown at
1360 With ``descend`` enabled, repositories in subdirectories are shown at
1358 a single level alongside repositories in the current path. With
1361 a single level alongside repositories in the current path. With
1359 ``collapse`` also enabled, repositories residing at a deeper level than
1362 ``collapse`` also enabled, repositories residing at a deeper level than
1360 the current path are grouped behind navigable directory entries that
1363 the current path are grouped behind navigable directory entries that
1361 lead to the locations of these repositories. In effect, this setting
1364 lead to the locations of these repositories. In effect, this setting
1362 collapses each collection of repositories found within a subdirectory
1365 collapses each collection of repositories found within a subdirectory
1363 into a single entry for that subdirectory. Default is False.
1366 into a single entry for that subdirectory. Default is False.
1364
1367
1365 ``comparisoncontext``
1368 ``comparisoncontext``
1366 Number of lines of context to show in side-by-side file comparison. If
1369 Number of lines of context to show in side-by-side file comparison. If
1367 negative or the value ``full``, whole files are shown. Default is 5.
1370 negative or the value ``full``, whole files are shown. Default is 5.
1368 This setting can be overridden by a ``context`` request parameter to the
1371 This setting can be overridden by a ``context`` request parameter to the
1369 ``comparison`` command, taking the same values.
1372 ``comparison`` command, taking the same values.
1370
1373
1371 ``contact``
1374 ``contact``
1372 Name or email address of the person in charge of the repository.
1375 Name or email address of the person in charge of the repository.
1373 Defaults to ui.username or ``$EMAIL`` or "unknown" if unset or empty.
1376 Defaults to ui.username or ``$EMAIL`` or "unknown" if unset or empty.
1374
1377
1375 ``deny_push``
1378 ``deny_push``
1376 Whether to deny pushing to the repository. If empty or not set,
1379 Whether to deny pushing to the repository. If empty or not set,
1377 push is not denied. If the special value ``*``, all remote users are
1380 push is not denied. If the special value ``*``, all remote users are
1378 denied push. Otherwise, unauthenticated users are all denied, and
1381 denied push. Otherwise, unauthenticated users are all denied, and
1379 any authenticated user name present in this list is also denied. The
1382 any authenticated user name present in this list is also denied. The
1380 contents of the deny_push list are examined before the allow_push list.
1383 contents of the deny_push list are examined before the allow_push list.
1381
1384
1382 ``deny_read``
1385 ``deny_read``
1383 Whether to deny reading/viewing of the repository. If this list is
1386 Whether to deny reading/viewing of the repository. If this list is
1384 not empty, unauthenticated users are all denied, and any
1387 not empty, unauthenticated users are all denied, and any
1385 authenticated user name present in this list is also denied access to
1388 authenticated user name present in this list is also denied access to
1386 the repository. If set to the special value ``*``, all remote users
1389 the repository. If set to the special value ``*``, all remote users
1387 are denied access (rarely needed ;). If deny_read is empty or not set,
1390 are denied access (rarely needed ;). If deny_read is empty or not set,
1388 the determination of repository access depends on the presence and
1391 the determination of repository access depends on the presence and
1389 content of the allow_read list (see description). If both
1392 content of the allow_read list (see description). If both
1390 deny_read and allow_read are empty or not set, then access is
1393 deny_read and allow_read are empty or not set, then access is
1391 permitted to all users by default. If the repository is being
1394 permitted to all users by default. If the repository is being
1392 served via hgwebdir, denied users will not be able to see it in
1395 served via hgwebdir, denied users will not be able to see it in
1393 the list of repositories. The contents of the deny_read list have
1396 the list of repositories. The contents of the deny_read list have
1394 priority over (are examined before) the contents of the allow_read
1397 priority over (are examined before) the contents of the allow_read
1395 list.
1398 list.
1396
1399
1397 ``descend``
1400 ``descend``
1398 hgwebdir indexes will not descend into subdirectories. Only repositories
1401 hgwebdir indexes will not descend into subdirectories. Only repositories
1399 directly in the current path will be shown (other repositories are still
1402 directly in the current path will be shown (other repositories are still
1400 available from the index corresponding to their containing path).
1403 available from the index corresponding to their containing path).
1401
1404
1402 ``description``
1405 ``description``
1403 Textual description of the repository's purpose or contents.
1406 Textual description of the repository's purpose or contents.
1404 Default is "unknown".
1407 Default is "unknown".
1405
1408
1406 ``encoding``
1409 ``encoding``
1407 Character encoding name. Default is the current locale charset.
1410 Character encoding name. Default is the current locale charset.
1408 Example: "UTF-8"
1411 Example: "UTF-8"
1409
1412
1410 ``errorlog``
1413 ``errorlog``
1411 Where to output the error log. Default is stderr.
1414 Where to output the error log. Default is stderr.
1412
1415
1413 ``guessmime``
1416 ``guessmime``
1414 Control MIME types for raw download of file content.
1417 Control MIME types for raw download of file content.
1415 Set to True to let hgweb guess the content type from the file
1418 Set to True to let hgweb guess the content type from the file
1416 extension. This will serve HTML files as ``text/html`` and might
1419 extension. This will serve HTML files as ``text/html`` and might
1417 allow cross-site scripting attacks when serving untrusted
1420 allow cross-site scripting attacks when serving untrusted
1418 repositories. Default is False.
1421 repositories. Default is False.
1419
1422
1420 ``hidden``
1423 ``hidden``
1421 Whether to hide the repository in the hgwebdir index.
1424 Whether to hide the repository in the hgwebdir index.
1422 Default is False.
1425 Default is False.
1423
1426
1424 ``ipv6``
1427 ``ipv6``
1425 Whether to use IPv6. Default is False.
1428 Whether to use IPv6. Default is False.
1426
1429
1427 ``logoimg``
1430 ``logoimg``
1428 File name of the logo image that some templates display on each page.
1431 File name of the logo image that some templates display on each page.
1429 The file name is relative to ``staticurl``. That is, the full path to
1432 The file name is relative to ``staticurl``. That is, the full path to
1430 the logo image is "staticurl/logoimg".
1433 the logo image is "staticurl/logoimg".
1431 If unset, ``hglogo.png`` will be used.
1434 If unset, ``hglogo.png`` will be used.
1432
1435
1433 ``logourl``
1436 ``logourl``
1434 Base URL to use for logos. If unset, ``http://mercurial.selenic.com/``
1437 Base URL to use for logos. If unset, ``http://mercurial.selenic.com/``
1435 will be used.
1438 will be used.
1436
1439
1437 ``maxchanges``
1440 ``maxchanges``
1438 Maximum number of changes to list on the changelog. Default is 10.
1441 Maximum number of changes to list on the changelog. Default is 10.
1439
1442
1440 ``maxfiles``
1443 ``maxfiles``
1441 Maximum number of files to list per changeset. Default is 10.
1444 Maximum number of files to list per changeset. Default is 10.
1442
1445
1443 ``maxshortchanges``
1446 ``maxshortchanges``
1444 Maximum number of changes to list on the shortlog, graph or filelog
1447 Maximum number of changes to list on the shortlog, graph or filelog
1445 pages. Default is 60.
1448 pages. Default is 60.
1446
1449
1447 ``name``
1450 ``name``
1448 Repository name to use in the web interface. Default is current
1451 Repository name to use in the web interface. Default is current
1449 working directory.
1452 working directory.
1450
1453
1451 ``port``
1454 ``port``
1452 Port to listen on. Default is 8000.
1455 Port to listen on. Default is 8000.
1453
1456
1454 ``prefix``
1457 ``prefix``
1455 Prefix path to serve from. Default is '' (server root).
1458 Prefix path to serve from. Default is '' (server root).
1456
1459
1457 ``push_ssl``
1460 ``push_ssl``
1458 Whether to require that inbound pushes be transported over SSL to
1461 Whether to require that inbound pushes be transported over SSL to
1459 prevent password sniffing. Default is True.
1462 prevent password sniffing. Default is True.
1460
1463
1461 ``staticurl``
1464 ``staticurl``
1462 Base URL to use for static files. If unset, static files (e.g. the
1465 Base URL to use for static files. If unset, static files (e.g. the
1463 hgicon.png favicon) will be served by the CGI script itself. Use
1466 hgicon.png favicon) will be served by the CGI script itself. Use
1464 this setting to serve them directly with the HTTP server.
1467 this setting to serve them directly with the HTTP server.
1465 Example: ``http://hgserver/static/``.
1468 Example: ``http://hgserver/static/``.
1466
1469
1467 ``stripes``
1470 ``stripes``
1468 How many lines a "zebra stripe" should span in multi-line output.
1471 How many lines a "zebra stripe" should span in multi-line output.
1469 Default is 1; set to 0 to disable.
1472 Default is 1; set to 0 to disable.
1470
1473
1471 ``style``
1474 ``style``
1472 Which template map style to use.
1475 Which template map style to use.
1473
1476
1474 ``templates``
1477 ``templates``
1475 Where to find the HTML templates. Default is install path.
1478 Where to find the HTML templates. Default is install path.
1476
1479
1477 ``websub``
1480 ``websub``
1478 ----------
1481 ----------
1479
1482
1480 Web substitution filter definition. You can use this section to
1483 Web substitution filter definition. You can use this section to
1481 define a set of regular expression substitution patterns which
1484 define a set of regular expression substitution patterns which
1482 let you automatically modify the hgweb server output.
1485 let you automatically modify the hgweb server output.
1483
1486
1484 The default hgweb templates only apply these substitution patterns
1487 The default hgweb templates only apply these substitution patterns
1485 on the revision description fields. You can apply them anywhere
1488 on the revision description fields. You can apply them anywhere
1486 you want when you create your own templates by adding calls to the
1489 you want when you create your own templates by adding calls to the
1487 "websub" filter (usually after calling the "escape" filter).
1490 "websub" filter (usually after calling the "escape" filter).
1488
1491
1489 This can be used, for example, to convert issue references to links
1492 This can be used, for example, to convert issue references to links
1490 to your issue tracker, or to convert "markdown-like" syntax into
1493 to your issue tracker, or to convert "markdown-like" syntax into
1491 HTML (see the examples below).
1494 HTML (see the examples below).
1492
1495
1493 Each entry in this section names a substitution filter.
1496 Each entry in this section names a substitution filter.
1494 The value of each entry defines the substitution expression itself.
1497 The value of each entry defines the substitution expression itself.
1495 The websub expressions follow the old interhg extension syntax,
1498 The websub expressions follow the old interhg extension syntax,
1496 which in turn imitates the Unix sed replacement syntax::
1499 which in turn imitates the Unix sed replacement syntax::
1497
1500
1498 patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i]
1501 patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i]
1499
1502
1500 You can use any separator other than "/". The final "i" is optional
1503 You can use any separator other than "/". The final "i" is optional
1501 and indicates that the search must be case insensitive.
1504 and indicates that the search must be case insensitive.
1502
1505
1503 Examples::
1506 Examples::
1504
1507
1505 [websub]
1508 [websub]
1506 issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i
1509 issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i
1507 italic = s/\b_(\S+)_\b/<i>\1<\/i>/
1510 italic = s/\b_(\S+)_\b/<i>\1<\/i>/
1508 bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/
1511 bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/
1509
1512
1510 ``worker``
1513 ``worker``
1511 ----------
1514 ----------
1512
1515
1513 Parallel master/worker configuration. We currently perform working
1516 Parallel master/worker configuration. We currently perform working
1514 directory updates in parallel on Unix-like systems, which greatly
1517 directory updates in parallel on Unix-like systems, which greatly
1515 helps performance.
1518 helps performance.
1516
1519
1517 ``numcpus``
1520 ``numcpus``
1518 Number of CPUs to use for parallel operations. Default is 4 or the
1521 Number of CPUs to use for parallel operations. Default is 4 or the
1519 number of CPUs on the system, whichever is larger. A zero or
1522 number of CPUs on the system, whichever is larger. A zero or
1520 negative value is treated as ``use the default``.
1523 negative value is treated as ``use the default``.
General Comments 0
You need to be logged in to leave comments. Login now