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