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