##// END OF EJS Templates
add explicit extension disabling syntax to hgrc.5
Steve Borho -
r6175:7f9f3233 default
parent child Browse files
Show More
@@ -1,677 +1,681 b''
1 HGRC(5)
1 HGRC(5)
2 =======
2 =======
3 Bryan O'Sullivan <bos@serpentine.com>
3 Bryan O'Sullivan <bos@serpentine.com>
4
4
5 NAME
5 NAME
6 ----
6 ----
7 hgrc - configuration files for Mercurial
7 hgrc - configuration files for Mercurial
8
8
9 SYNOPSIS
9 SYNOPSIS
10 --------
10 --------
11
11
12 The Mercurial system uses a set of configuration files to control
12 The Mercurial system uses a set of configuration files to control
13 aspects of its behaviour.
13 aspects of its behaviour.
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 The names of these files depend on the system on which Mercurial is
19 The names of these files depend on the system on which Mercurial is
20 installed. Windows registry keys contain PATH-like strings, every
20 installed. Windows registry keys contain PATH-like strings, every
21 part must reference a Mercurial.ini file or be a directory where *.rc
21 part must reference a Mercurial.ini file or be a directory where *.rc
22 files will be read.
22 files will be read.
23
23
24 (Unix) <install-root>/etc/mercurial/hgrc.d/*.rc::
24 (Unix) <install-root>/etc/mercurial/hgrc.d/*.rc::
25 (Unix) <install-root>/etc/mercurial/hgrc::
25 (Unix) <install-root>/etc/mercurial/hgrc::
26 Per-installation configuration files, searched for in the
26 Per-installation configuration files, searched for in the
27 directory where Mercurial is installed. For example, if installed
27 directory where Mercurial is installed. For example, if installed
28 in /shared/tools, Mercurial will look in
28 in /shared/tools, Mercurial will look in
29 /shared/tools/etc/mercurial/hgrc. Options in these files apply to
29 /shared/tools/etc/mercurial/hgrc. Options in these files apply to
30 all Mercurial commands executed by any user in any directory.
30 all Mercurial commands executed by any user in any directory.
31
31
32 (Unix) /etc/mercurial/hgrc.d/*.rc::
32 (Unix) /etc/mercurial/hgrc.d/*.rc::
33 (Unix) /etc/mercurial/hgrc::
33 (Unix) /etc/mercurial/hgrc::
34 (Windows) HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial::
34 (Windows) HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial::
35 or::
35 or::
36 (Windows) C:\Mercurial\Mercurial.ini::
36 (Windows) C:\Mercurial\Mercurial.ini::
37 Per-system configuration files, for the system on which Mercurial
37 Per-system configuration files, for the system on which Mercurial
38 is running. Options in these files apply to all Mercurial
38 is running. Options in these files apply to all Mercurial
39 commands executed by any user in any directory. Options in these
39 commands executed by any user in any directory. Options in these
40 files override per-installation options.
40 files override per-installation options.
41
41
42 (Unix) $HOME/.hgrc::
42 (Unix) $HOME/.hgrc::
43 (Windows) C:\Documents and Settings\USERNAME\Mercurial.ini::
43 (Windows) C:\Documents and Settings\USERNAME\Mercurial.ini::
44 (Windows) $HOME\Mercurial.ini::
44 (Windows) $HOME\Mercurial.ini::
45 Per-user configuration file, for the user running Mercurial.
45 Per-user configuration file, for the user running Mercurial.
46 Options in this file apply to all Mercurial commands executed by
46 Options in this file apply to all Mercurial commands executed by
47 any user in any directory. Options in this file override
47 any user in any directory. Options in this file override
48 per-installation and per-system options.
48 per-installation and per-system options.
49 On Windows system, one of these is chosen exclusively according
49 On Windows system, one of these is chosen exclusively according
50 to definition of HOME environment variable.
50 to definition of HOME environment variable.
51
51
52 (Unix, Windows) <repo>/.hg/hgrc::
52 (Unix, Windows) <repo>/.hg/hgrc::
53 Per-repository configuration options that only apply in a
53 Per-repository configuration options that only apply in a
54 particular repository. This file is not version-controlled, and
54 particular repository. This file is not version-controlled, and
55 will not get transferred during a "clone" operation. Options in
55 will not get transferred during a "clone" operation. Options in
56 this file override options in all other configuration files.
56 this file override options in all other configuration files.
57 On Unix, most of this file will be ignored if it doesn't belong
57 On Unix, most of this file will be ignored if it doesn't belong
58 to a trusted user or to a trusted group. See the documentation
58 to a trusted user or to a trusted group. See the documentation
59 for the trusted section below for more details.
59 for the trusted section below for more details.
60
60
61 SYNTAX
61 SYNTAX
62 ------
62 ------
63
63
64 A configuration file consists of sections, led by a "[section]" header
64 A configuration file consists of sections, led by a "[section]" header
65 and followed by "name: value" entries; "name=value" is also accepted.
65 and followed by "name: value" entries; "name=value" is also accepted.
66
66
67 [spam]
67 [spam]
68 eggs=ham
68 eggs=ham
69 green=
69 green=
70 eggs
70 eggs
71
71
72 Each line contains one entry. If the lines that follow are indented,
72 Each line contains one entry. If the lines that follow are indented,
73 they are treated as continuations of that entry.
73 they are treated as continuations of that entry.
74
74
75 Leading whitespace is removed from values. Empty lines are skipped.
75 Leading whitespace is removed from values. Empty lines are skipped.
76
76
77 The optional values can contain format strings which refer to other
77 The optional values can contain format strings which refer to other
78 values in the same section, or values in a special DEFAULT section.
78 values in the same section, or values in a special DEFAULT section.
79
79
80 Lines beginning with "#" or ";" are ignored and may be used to provide
80 Lines beginning with "#" or ";" are ignored and may be used to provide
81 comments.
81 comments.
82
82
83 SECTIONS
83 SECTIONS
84 --------
84 --------
85
85
86 This section describes the different sections that may appear in a
86 This section describes the different sections that may appear in a
87 Mercurial "hgrc" file, the purpose of each section, its possible
87 Mercurial "hgrc" file, the purpose of each section, its possible
88 keys, and their possible values.
88 keys, and their possible values.
89
89
90 decode/encode::
90 decode/encode::
91 Filters for transforming files on checkout/checkin. This would
91 Filters for transforming files on checkout/checkin. This would
92 typically be used for newline processing or other
92 typically be used for newline processing or other
93 localization/canonicalization of files.
93 localization/canonicalization of files.
94
94
95 Filters consist of a filter pattern followed by a filter command.
95 Filters consist of a filter pattern followed by a filter command.
96 Filter patterns are globs by default, rooted at the repository
96 Filter patterns are globs by default, rooted at the repository
97 root. For example, to match any file ending in ".txt" in the root
97 root. For example, to match any file ending in ".txt" in the root
98 directory only, use the pattern "*.txt". To match any file ending
98 directory only, use the pattern "*.txt". To match any file ending
99 in ".c" anywhere in the repository, use the pattern "**.c".
99 in ".c" anywhere in the repository, use the pattern "**.c".
100
100
101 The filter command can start with a specifier, either "pipe:" or
101 The filter command can start with a specifier, either "pipe:" or
102 "tempfile:". If no specifier is given, "pipe:" is used by default.
102 "tempfile:". If no specifier is given, "pipe:" is used by default.
103
103
104 A "pipe:" command must accept data on stdin and return the
104 A "pipe:" command must accept data on stdin and return the
105 transformed data on stdout.
105 transformed data on stdout.
106
106
107 Pipe example:
107 Pipe example:
108
108
109 [encode]
109 [encode]
110 # uncompress gzip files on checkin to improve delta compression
110 # uncompress gzip files on checkin to improve delta compression
111 # note: not necessarily a good idea, just an example
111 # note: not necessarily a good idea, just an example
112 *.gz = pipe: gunzip
112 *.gz = pipe: gunzip
113
113
114 [decode]
114 [decode]
115 # recompress gzip files when writing them to the working dir (we
115 # recompress gzip files when writing them to the working dir (we
116 # can safely omit "pipe:", because it's the default)
116 # can safely omit "pipe:", because it's the default)
117 *.gz = gzip
117 *.gz = gzip
118
118
119 A "tempfile:" command is a template. The string INFILE is replaced
119 A "tempfile:" command is a template. The string INFILE is replaced
120 with the name of a temporary file that contains the data to be
120 with the name of a temporary file that contains the data to be
121 filtered by the command. The string OUTFILE is replaced with the
121 filtered by the command. The string OUTFILE is replaced with the
122 name of an empty temporary file, where the filtered data must be
122 name of an empty temporary file, where the filtered data must be
123 written by the command.
123 written by the command.
124
124
125 NOTE: the tempfile mechanism is recommended for Windows systems,
125 NOTE: the tempfile mechanism is recommended for Windows systems,
126 where the standard shell I/O redirection operators often have
126 where the standard shell I/O redirection operators often have
127 strange effects and may corrupt the contents of your files.
127 strange effects and may corrupt the contents of your files.
128
128
129 The most common usage is for LF <-> CRLF translation on Windows.
129 The most common usage is for LF <-> CRLF translation on Windows.
130 For this, use the "smart" convertors which check for binary files:
130 For this, use the "smart" convertors which check for binary files:
131
131
132 [extensions]
132 [extensions]
133 hgext.win32text =
133 hgext.win32text =
134 [encode]
134 [encode]
135 ** = cleverencode:
135 ** = cleverencode:
136 [decode]
136 [decode]
137 ** = cleverdecode:
137 ** = cleverdecode:
138
138
139 or if you only want to translate certain files:
139 or if you only want to translate certain files:
140
140
141 [extensions]
141 [extensions]
142 hgext.win32text =
142 hgext.win32text =
143 [encode]
143 [encode]
144 **.txt = dumbencode:
144 **.txt = dumbencode:
145 [decode]
145 [decode]
146 **.txt = dumbdecode:
146 **.txt = dumbdecode:
147
147
148 defaults::
148 defaults::
149 Use the [defaults] section to define command defaults, i.e. the
149 Use the [defaults] section to define command defaults, i.e. the
150 default options/arguments to pass to the specified commands.
150 default options/arguments to pass to the specified commands.
151
151
152 The following example makes 'hg log' run in verbose mode, and
152 The following example makes 'hg log' run in verbose mode, and
153 'hg status' show only the modified files, by default.
153 'hg status' show only the modified files, by default.
154
154
155 [defaults]
155 [defaults]
156 log = -v
156 log = -v
157 status = -m
157 status = -m
158
158
159 The actual commands, instead of their aliases, must be used when
159 The actual commands, instead of their aliases, must be used when
160 defining command defaults. The command defaults will also be
160 defining command defaults. The command defaults will also be
161 applied to the aliases of the commands defined.
161 applied to the aliases of the commands defined.
162
162
163 diff::
163 diff::
164 Settings used when displaying diffs. They are all boolean and
164 Settings used when displaying diffs. They are all boolean and
165 defaults to False.
165 defaults to False.
166 git;;
166 git;;
167 Use git extended diff format.
167 Use git extended diff format.
168 nodates;;
168 nodates;;
169 Don't include dates in diff headers.
169 Don't include dates in diff headers.
170 showfunc;;
170 showfunc;;
171 Show which function each change is in.
171 Show which function each change is in.
172 ignorews;;
172 ignorews;;
173 Ignore white space when comparing lines.
173 Ignore white space when comparing lines.
174 ignorewsamount;;
174 ignorewsamount;;
175 Ignore changes in the amount of white space.
175 Ignore changes in the amount of white space.
176 ignoreblanklines;;
176 ignoreblanklines;;
177 Ignore changes whose lines are all blank.
177 Ignore changes whose lines are all blank.
178
178
179 email::
179 email::
180 Settings for extensions that send email messages.
180 Settings for extensions that send email messages.
181 from;;
181 from;;
182 Optional. Email address to use in "From" header and SMTP envelope
182 Optional. Email address to use in "From" header and SMTP envelope
183 of outgoing messages.
183 of outgoing messages.
184 to;;
184 to;;
185 Optional. Comma-separated list of recipients' email addresses.
185 Optional. Comma-separated list of recipients' email addresses.
186 cc;;
186 cc;;
187 Optional. Comma-separated list of carbon copy recipients'
187 Optional. Comma-separated list of carbon copy recipients'
188 email addresses.
188 email addresses.
189 bcc;;
189 bcc;;
190 Optional. Comma-separated list of blind carbon copy
190 Optional. Comma-separated list of blind carbon copy
191 recipients' email addresses. Cannot be set interactively.
191 recipients' email addresses. Cannot be set interactively.
192 method;;
192 method;;
193 Optional. Method to use to send email messages. If value is
193 Optional. Method to use to send email messages. If value is
194 "smtp" (default), use SMTP (see section "[smtp]" for
194 "smtp" (default), use SMTP (see section "[smtp]" for
195 configuration). Otherwise, use as name of program to run that
195 configuration). Otherwise, use as name of program to run that
196 acts like sendmail (takes "-f" option for sender, list of
196 acts like sendmail (takes "-f" option for sender, list of
197 recipients on command line, message on stdin). Normally, setting
197 recipients on command line, message on stdin). Normally, setting
198 this to "sendmail" or "/usr/sbin/sendmail" is enough to use
198 this to "sendmail" or "/usr/sbin/sendmail" is enough to use
199 sendmail to send messages.
199 sendmail to send messages.
200
200
201 Email example:
201 Email example:
202
202
203 [email]
203 [email]
204 from = Joseph User <joe.user@example.com>
204 from = Joseph User <joe.user@example.com>
205 method = /usr/sbin/sendmail
205 method = /usr/sbin/sendmail
206
206
207 extensions::
207 extensions::
208 Mercurial has an extension mechanism for adding new features. To
208 Mercurial has an extension mechanism for adding new features. To
209 enable an extension, create an entry for it in this section.
209 enable an extension, create an entry for it in this section.
210
210
211 If you know that the extension is already in Python's search path,
211 If you know that the extension is already in Python's search path,
212 you can give the name of the module, followed by "=", with nothing
212 you can give the name of the module, followed by "=", with nothing
213 after the "=".
213 after the "=".
214
214
215 Otherwise, give a name that you choose, followed by "=", followed by
215 Otherwise, give a name that you choose, followed by "=", followed by
216 the path to the ".py" file (including the file name extension) that
216 the path to the ".py" file (including the file name extension) that
217 defines the extension.
217 defines the extension.
218
218
219 To explicitly disable an extension that is enabled in an hgrc of
220 broader scope, prepend its path with '!', as in
221 'hgext.foo = !/ext/path' or 'hgext.foo = !' when no path is supplied.
222
219 Example for ~/.hgrc:
223 Example for ~/.hgrc:
220
224
221 [extensions]
225 [extensions]
222 # (the mq extension will get loaded from mercurial's path)
226 # (the mq extension will get loaded from mercurial's path)
223 hgext.mq =
227 hgext.mq =
224 # (this extension will get loaded from the file specified)
228 # (this extension will get loaded from the file specified)
225 myfeature = ~/.hgext/myfeature.py
229 myfeature = ~/.hgext/myfeature.py
226
230
227 format::
231 format::
228
232
229 usestore;;
233 usestore;;
230 Enable or disable the "store" repository format which improves
234 Enable or disable the "store" repository format which improves
231 compatibility with systems that fold case or otherwise mangle
235 compatibility with systems that fold case or otherwise mangle
232 filenames. Enabled by default. Disabling this option will allow
236 filenames. Enabled by default. Disabling this option will allow
233 you to store longer filenames in some situations at the expense of
237 you to store longer filenames in some situations at the expense of
234 compatibility.
238 compatibility.
235
239
236 merge-patterns::
240 merge-patterns::
237 This section specifies merge tools to associate with particular file
241 This section specifies merge tools to associate with particular file
238 patterns. Tools matched here will take precedence over the default
242 patterns. Tools matched here will take precedence over the default
239 merge tool. Patterns are globs by default, rooted at the repository root.
243 merge tool. Patterns are globs by default, rooted at the repository root.
240
244
241 Example:
245 Example:
242
246
243 [merge-patterns]
247 [merge-patterns]
244 **.c = kdiff3
248 **.c = kdiff3
245 **.jpg = myimgmerge
249 **.jpg = myimgmerge
246
250
247 merge-tools::
251 merge-tools::
248 This section configures external merge tools to use for file-level
252 This section configures external merge tools to use for file-level
249 merges.
253 merges.
250
254
251 Example ~/.hgrc:
255 Example ~/.hgrc:
252
256
253 [merge-tools]
257 [merge-tools]
254 # Override stock tool location
258 # Override stock tool location
255 kdiff3.executable = ~/bin/kdiff3
259 kdiff3.executable = ~/bin/kdiff3
256 # Specify command line
260 # Specify command line
257 kdiff3.args = $base $local $other -o $output
261 kdiff3.args = $base $local $other -o $output
258 # Give higher priority
262 # Give higher priority
259 kdiff3.priority = 1
263 kdiff3.priority = 1
260
264
261 # Define new tool
265 # Define new tool
262 myHtmlTool.args = -m $local $other $base $output
266 myHtmlTool.args = -m $local $other $base $output
263 myHtmlTool.regkey = Software\FooSoftware\HtmlMerge
267 myHtmlTool.regkey = Software\FooSoftware\HtmlMerge
264 myHtmlTool.priority = 1
268 myHtmlTool.priority = 1
265
269
266 Supported arguments:
270 Supported arguments:
267 priority;;
271 priority;;
268 The priority in which to evaluate this tool.
272 The priority in which to evaluate this tool.
269 Default: 0.
273 Default: 0.
270 executable;;
274 executable;;
271 Either just the name of the executable or its pathname.
275 Either just the name of the executable or its pathname.
272 Default: the tool name.
276 Default: the tool name.
273 args;;
277 args;;
274 The arguments to pass to the tool executable. You can refer to the files
278 The arguments to pass to the tool executable. You can refer to the files
275 being merged as well as the output file through these variables: $base,
279 being merged as well as the output file through these variables: $base,
276 $local, $other, $output.
280 $local, $other, $output.
277 Default: $local $base $other
281 Default: $local $base $other
278 premerge;;
282 premerge;;
279 Attempt to run internal non-interactive 3-way merge tool before
283 Attempt to run internal non-interactive 3-way merge tool before
280 launching external tool.
284 launching external tool.
281 Default: True
285 Default: True
282 binary;;
286 binary;;
283 This tool can merge binary files. Defaults to False, unless tool
287 This tool can merge binary files. Defaults to False, unless tool
284 was selected by file pattern match.
288 was selected by file pattern match.
285 symlink;;
289 symlink;;
286 This tool can merge symlinks. Defaults to False, even if tool was
290 This tool can merge symlinks. Defaults to False, even if tool was
287 selected by file pattern match.
291 selected by file pattern match.
288 checkconflicts;;
292 checkconflicts;;
289 Check whether there are conflicts even though the tool reported
293 Check whether there are conflicts even though the tool reported
290 success.
294 success.
291 Default: False
295 Default: False
292 checkchanged;;
296 checkchanged;;
293 Check whether outputs were written even though the tool reported
297 Check whether outputs were written even though the tool reported
294 success.
298 success.
295 Default: False
299 Default: False
296 fixeol;;
300 fixeol;;
297 Attempt to fix up EOL changes caused by the merge tool.
301 Attempt to fix up EOL changes caused by the merge tool.
298 Default: False
302 Default: False
299 gui:;
303 gui:;
300 This tool requires a graphical interface to run. Default: False
304 This tool requires a graphical interface to run. Default: False
301 regkey;;
305 regkey;;
302 Windows registry key which describes install location of this tool.
306 Windows registry key which describes install location of this tool.
303 Mercurial will search for this key first under HKEY_CURRENT_USER and
307 Mercurial will search for this key first under HKEY_CURRENT_USER and
304 then under HKEY_LOCAL_MACHINE. Default: None
308 then under HKEY_LOCAL_MACHINE. Default: None
305 regname;;
309 regname;;
306 Name of value to read from specified registry key. Defaults to the
310 Name of value to read from specified registry key. Defaults to the
307 unnamed (default) value.
311 unnamed (default) value.
308 regappend;;
312 regappend;;
309 String to append to the value read from the registry, typically the
313 String to append to the value read from the registry, typically the
310 executable name of the tool. Default: None
314 executable name of the tool. Default: None
311
315
312 hooks::
316 hooks::
313 Commands or Python functions that get automatically executed by
317 Commands or Python functions that get automatically executed by
314 various actions such as starting or finishing a commit. Multiple
318 various actions such as starting or finishing a commit. Multiple
315 hooks can be run for the same action by appending a suffix to the
319 hooks can be run for the same action by appending a suffix to the
316 action. Overriding a site-wide hook can be done by changing its
320 action. Overriding a site-wide hook can be done by changing its
317 value or setting it to an empty string.
321 value or setting it to an empty string.
318
322
319 Example .hg/hgrc:
323 Example .hg/hgrc:
320
324
321 [hooks]
325 [hooks]
322 # do not use the site-wide hook
326 # do not use the site-wide hook
323 incoming =
327 incoming =
324 incoming.email = /my/email/hook
328 incoming.email = /my/email/hook
325 incoming.autobuild = /my/build/hook
329 incoming.autobuild = /my/build/hook
326
330
327 Most hooks are run with environment variables set that give added
331 Most hooks are run with environment variables set that give added
328 useful information. For each hook below, the environment variables
332 useful information. For each hook below, the environment variables
329 it is passed are listed with names of the form "$HG_foo".
333 it is passed are listed with names of the form "$HG_foo".
330
334
331 changegroup;;
335 changegroup;;
332 Run after a changegroup has been added via push, pull or
336 Run after a changegroup has been added via push, pull or
333 unbundle. ID of the first new changeset is in $HG_NODE. URL from
337 unbundle. ID of the first new changeset is in $HG_NODE. URL from
334 which changes came is in $HG_URL.
338 which changes came is in $HG_URL.
335 commit;;
339 commit;;
336 Run after a changeset has been created in the local repository.
340 Run after a changeset has been created in the local repository.
337 ID of the newly created changeset is in $HG_NODE. Parent
341 ID of the newly created changeset is in $HG_NODE. Parent
338 changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
342 changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
339 incoming;;
343 incoming;;
340 Run after a changeset has been pulled, pushed, or unbundled into
344 Run after a changeset has been pulled, pushed, or unbundled into
341 the local repository. The ID of the newly arrived changeset is in
345 the local repository. The ID of the newly arrived changeset is in
342 $HG_NODE. URL that was source of changes came is in $HG_URL.
346 $HG_NODE. URL that was source of changes came is in $HG_URL.
343 outgoing;;
347 outgoing;;
344 Run after sending changes from local repository to another. ID of
348 Run after sending changes from local repository to another. ID of
345 first changeset sent is in $HG_NODE. Source of operation is in
349 first changeset sent is in $HG_NODE. Source of operation is in
346 $HG_SOURCE; see "preoutgoing" hook for description.
350 $HG_SOURCE; see "preoutgoing" hook for description.
347 post-<command>;;
351 post-<command>;;
348 Run after successful invocations of the associated command. The
352 Run after successful invocations of the associated command. The
349 contents of the command line are passed as $HG_ARGS and the result
353 contents of the command line are passed as $HG_ARGS and the result
350 code in $HG_RESULT. Hook failure is ignored.
354 code in $HG_RESULT. Hook failure is ignored.
351 pre-<command>;;
355 pre-<command>;;
352 Run before executing the associated command. The contents of the
356 Run before executing the associated command. The contents of the
353 command line are passed as $HG_ARGS. If the hook returns failure,
357 command line are passed as $HG_ARGS. If the hook returns failure,
354 the command doesn't execute and Mercurial returns the failure code.
358 the command doesn't execute and Mercurial returns the failure code.
355 prechangegroup;;
359 prechangegroup;;
356 Run before a changegroup is added via push, pull or unbundle.
360 Run before a changegroup is added via push, pull or unbundle.
357 Exit status 0 allows the changegroup to proceed. Non-zero status
361 Exit status 0 allows the changegroup to proceed. Non-zero status
358 will cause the push, pull or unbundle to fail. URL from which
362 will cause the push, pull or unbundle to fail. URL from which
359 changes will come is in $HG_URL.
363 changes will come is in $HG_URL.
360 precommit;;
364 precommit;;
361 Run before starting a local commit. Exit status 0 allows the
365 Run before starting a local commit. Exit status 0 allows the
362 commit to proceed. Non-zero status will cause the commit to fail.
366 commit to proceed. Non-zero status will cause the commit to fail.
363 Parent changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
367 Parent changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
364 preoutgoing;;
368 preoutgoing;;
365 Run before collecting changes to send from the local repository to
369 Run before collecting changes to send from the local repository to
366 another. Non-zero status will cause failure. This lets you
370 another. Non-zero status will cause failure. This lets you
367 prevent pull over http or ssh. Also prevents against local pull,
371 prevent pull over http or ssh. Also prevents against local pull,
368 push (outbound) or bundle commands, but not effective, since you
372 push (outbound) or bundle commands, but not effective, since you
369 can just copy files instead then. Source of operation is in
373 can just copy files instead then. Source of operation is in
370 $HG_SOURCE. If "serve", operation is happening on behalf of
374 $HG_SOURCE. If "serve", operation is happening on behalf of
371 remote ssh or http repository. If "push", "pull" or "bundle",
375 remote ssh or http repository. If "push", "pull" or "bundle",
372 operation is happening on behalf of repository on same system.
376 operation is happening on behalf of repository on same system.
373 pretag;;
377 pretag;;
374 Run before creating a tag. Exit status 0 allows the tag to be
378 Run before creating a tag. Exit status 0 allows the tag to be
375 created. Non-zero status will cause the tag to fail. ID of
379 created. Non-zero status will cause the tag to fail. ID of
376 changeset to tag is in $HG_NODE. Name of tag is in $HG_TAG. Tag
380 changeset to tag is in $HG_NODE. Name of tag is in $HG_TAG. Tag
377 is local if $HG_LOCAL=1, in repo if $HG_LOCAL=0.
381 is local if $HG_LOCAL=1, in repo if $HG_LOCAL=0.
378 pretxnchangegroup;;
382 pretxnchangegroup;;
379 Run after a changegroup has been added via push, pull or unbundle,
383 Run after a changegroup has been added via push, pull or unbundle,
380 but before the transaction has been committed. Changegroup is
384 but before the transaction has been committed. Changegroup is
381 visible to hook program. This lets you validate incoming changes
385 visible to hook program. This lets you validate incoming changes
382 before accepting them. Passed the ID of the first new changeset
386 before accepting them. Passed the ID of the first new changeset
383 in $HG_NODE. Exit status 0 allows the transaction to commit.
387 in $HG_NODE. Exit status 0 allows the transaction to commit.
384 Non-zero status will cause the transaction to be rolled back and
388 Non-zero status will cause the transaction to be rolled back and
385 the push, pull or unbundle will fail. URL that was source of
389 the push, pull or unbundle will fail. URL that was source of
386 changes is in $HG_URL.
390 changes is in $HG_URL.
387 pretxncommit;;
391 pretxncommit;;
388 Run after a changeset has been created but the transaction not yet
392 Run after a changeset has been created but the transaction not yet
389 committed. Changeset is visible to hook program. This lets you
393 committed. Changeset is visible to hook program. This lets you
390 validate commit message and changes. Exit status 0 allows the
394 validate commit message and changes. Exit status 0 allows the
391 commit to proceed. Non-zero status will cause the transaction to
395 commit to proceed. Non-zero status will cause the transaction to
392 be rolled back. ID of changeset is in $HG_NODE. Parent changeset
396 be rolled back. ID of changeset is in $HG_NODE. Parent changeset
393 IDs are in $HG_PARENT1 and $HG_PARENT2.
397 IDs are in $HG_PARENT1 and $HG_PARENT2.
394 preupdate;;
398 preupdate;;
395 Run before updating the working directory. Exit status 0 allows
399 Run before updating the working directory. Exit status 0 allows
396 the update to proceed. Non-zero status will prevent the update.
400 the update to proceed. Non-zero status will prevent the update.
397 Changeset ID of first new parent is in $HG_PARENT1. If merge, ID
401 Changeset ID of first new parent is in $HG_PARENT1. If merge, ID
398 of second new parent is in $HG_PARENT2.
402 of second new parent is in $HG_PARENT2.
399 tag;;
403 tag;;
400 Run after a tag is created. ID of tagged changeset is in
404 Run after a tag is created. ID of tagged changeset is in
401 $HG_NODE. Name of tag is in $HG_TAG. Tag is local if
405 $HG_NODE. Name of tag is in $HG_TAG. Tag is local if
402 $HG_LOCAL=1, in repo if $HG_LOCAL=0.
406 $HG_LOCAL=1, in repo if $HG_LOCAL=0.
403 update;;
407 update;;
404 Run after updating the working directory. Changeset ID of first
408 Run after updating the working directory. Changeset ID of first
405 new parent is in $HG_PARENT1. If merge, ID of second new parent
409 new parent is in $HG_PARENT1. If merge, ID of second new parent
406 is in $HG_PARENT2. If update succeeded, $HG_ERROR=0. If update
410 is in $HG_PARENT2. If update succeeded, $HG_ERROR=0. If update
407 failed (e.g. because conflicts not resolved), $HG_ERROR=1.
411 failed (e.g. because conflicts not resolved), $HG_ERROR=1.
408
412
409 Note: it is generally better to use standard hooks rather than the
413 Note: it is generally better to use standard hooks rather than the
410 generic pre- and post- command hooks as they are guaranteed to be
414 generic pre- and post- command hooks as they are guaranteed to be
411 called in the appropriate contexts for influencing transactions.
415 called in the appropriate contexts for influencing transactions.
412 Also, hooks like "commit" will be called in all contexts that
416 Also, hooks like "commit" will be called in all contexts that
413 generate a commit (eg. tag) and not just the commit command.
417 generate a commit (eg. tag) and not just the commit command.
414
418
415 Note2: Environment variables with empty values may not be passed to
419 Note2: Environment variables with empty values may not be passed to
416 hooks on platforms like Windows. For instance, $HG_PARENT2 will
420 hooks on platforms like Windows. For instance, $HG_PARENT2 will
417 not be available under Windows for non-merge changesets while being
421 not be available under Windows for non-merge changesets while being
418 set to an empty value under Unix-like systems.
422 set to an empty value under Unix-like systems.
419
423
420 The syntax for Python hooks is as follows:
424 The syntax for Python hooks is as follows:
421
425
422 hookname = python:modulename.submodule.callable
426 hookname = python:modulename.submodule.callable
423
427
424 Python hooks are run within the Mercurial process. Each hook is
428 Python hooks are run within the Mercurial process. Each hook is
425 called with at least three keyword arguments: a ui object (keyword
429 called with at least three keyword arguments: a ui object (keyword
426 "ui"), a repository object (keyword "repo"), and a "hooktype"
430 "ui"), a repository object (keyword "repo"), and a "hooktype"
427 keyword that tells what kind of hook is used. Arguments listed as
431 keyword that tells what kind of hook is used. Arguments listed as
428 environment variables above are passed as keyword arguments, with no
432 environment variables above are passed as keyword arguments, with no
429 "HG_" prefix, and names in lower case.
433 "HG_" prefix, and names in lower case.
430
434
431 If a Python hook returns a "true" value or raises an exception, this
435 If a Python hook returns a "true" value or raises an exception, this
432 is treated as failure of the hook.
436 is treated as failure of the hook.
433
437
434 http_proxy::
438 http_proxy::
435 Used to access web-based Mercurial repositories through a HTTP
439 Used to access web-based Mercurial repositories through a HTTP
436 proxy.
440 proxy.
437 host;;
441 host;;
438 Host name and (optional) port of the proxy server, for example
442 Host name and (optional) port of the proxy server, for example
439 "myproxy:8000".
443 "myproxy:8000".
440 no;;
444 no;;
441 Optional. Comma-separated list of host names that should bypass
445 Optional. Comma-separated list of host names that should bypass
442 the proxy.
446 the proxy.
443 passwd;;
447 passwd;;
444 Optional. Password to authenticate with at the proxy server.
448 Optional. Password to authenticate with at the proxy server.
445 user;;
449 user;;
446 Optional. User name to authenticate with at the proxy server.
450 Optional. User name to authenticate with at the proxy server.
447
451
448 smtp::
452 smtp::
449 Configuration for extensions that need to send email messages.
453 Configuration for extensions that need to send email messages.
450 host;;
454 host;;
451 Host name of mail server, e.g. "mail.example.com".
455 Host name of mail server, e.g. "mail.example.com".
452 port;;
456 port;;
453 Optional. Port to connect to on mail server. Default: 25.
457 Optional. Port to connect to on mail server. Default: 25.
454 tls;;
458 tls;;
455 Optional. Whether to connect to mail server using TLS. True or
459 Optional. Whether to connect to mail server using TLS. True or
456 False. Default: False.
460 False. Default: False.
457 username;;
461 username;;
458 Optional. User name to authenticate to SMTP server with.
462 Optional. User name to authenticate to SMTP server with.
459 If username is specified, password must also be specified.
463 If username is specified, password must also be specified.
460 Default: none.
464 Default: none.
461 password;;
465 password;;
462 Optional. Password to authenticate to SMTP server with.
466 Optional. Password to authenticate to SMTP server with.
463 If username is specified, password must also be specified.
467 If username is specified, password must also be specified.
464 Default: none.
468 Default: none.
465 local_hostname;;
469 local_hostname;;
466 Optional. It's the hostname that the sender can use to identify itself
470 Optional. It's the hostname that the sender can use to identify itself
467 to the MTA.
471 to the MTA.
468
472
469 paths::
473 paths::
470 Assigns symbolic names to repositories. The left side is the
474 Assigns symbolic names to repositories. The left side is the
471 symbolic name, and the right gives the directory or URL that is the
475 symbolic name, and the right gives the directory or URL that is the
472 location of the repository. Default paths can be declared by
476 location of the repository. Default paths can be declared by
473 setting the following entries.
477 setting the following entries.
474 default;;
478 default;;
475 Directory or URL to use when pulling if no source is specified.
479 Directory or URL to use when pulling if no source is specified.
476 Default is set to repository from which the current repository
480 Default is set to repository from which the current repository
477 was cloned.
481 was cloned.
478 default-push;;
482 default-push;;
479 Optional. Directory or URL to use when pushing if no destination
483 Optional. Directory or URL to use when pushing if no destination
480 is specified.
484 is specified.
481
485
482 server::
486 server::
483 Controls generic server settings.
487 Controls generic server settings.
484 uncompressed;;
488 uncompressed;;
485 Whether to allow clients to clone a repo using the uncompressed
489 Whether to allow clients to clone a repo using the uncompressed
486 streaming protocol. This transfers about 40% more data than a
490 streaming protocol. This transfers about 40% more data than a
487 regular clone, but uses less memory and CPU on both server and
491 regular clone, but uses less memory and CPU on both server and
488 client. Over a LAN (100Mbps or better) or a very fast WAN, an
492 client. Over a LAN (100Mbps or better) or a very fast WAN, an
489 uncompressed streaming clone is a lot faster (~10x) than a regular
493 uncompressed streaming clone is a lot faster (~10x) than a regular
490 clone. Over most WAN connections (anything slower than about
494 clone. Over most WAN connections (anything slower than about
491 6Mbps), uncompressed streaming is slower, because of the extra
495 6Mbps), uncompressed streaming is slower, because of the extra
492 data transfer overhead. Default is False.
496 data transfer overhead. Default is False.
493
497
494 trusted::
498 trusted::
495 For security reasons, Mercurial will not use the settings in
499 For security reasons, Mercurial will not use the settings in
496 the .hg/hgrc file from a repository if it doesn't belong to a
500 the .hg/hgrc file from a repository if it doesn't belong to a
497 trusted user or to a trusted group. The main exception is the
501 trusted user or to a trusted group. The main exception is the
498 web interface, which automatically uses some safe settings, since
502 web interface, which automatically uses some safe settings, since
499 it's common to serve repositories from different users.
503 it's common to serve repositories from different users.
500
504
501 This section specifies what users and groups are trusted. The
505 This section specifies what users and groups are trusted. The
502 current user is always trusted. To trust everybody, list a user
506 current user is always trusted. To trust everybody, list a user
503 or a group with name "*".
507 or a group with name "*".
504
508
505 users;;
509 users;;
506 Comma-separated list of trusted users.
510 Comma-separated list of trusted users.
507 groups;;
511 groups;;
508 Comma-separated list of trusted groups.
512 Comma-separated list of trusted groups.
509
513
510 ui::
514 ui::
511 User interface controls.
515 User interface controls.
512 debug;;
516 debug;;
513 Print debugging information. True or False. Default is False.
517 Print debugging information. True or False. Default is False.
514 editor;;
518 editor;;
515 The editor to use during a commit. Default is $EDITOR or "vi".
519 The editor to use during a commit. Default is $EDITOR or "vi".
516 fallbackencoding;;
520 fallbackencoding;;
517 Encoding to try if it's not possible to decode the changelog using
521 Encoding to try if it's not possible to decode the changelog using
518 UTF-8. Default is ISO-8859-1.
522 UTF-8. Default is ISO-8859-1.
519 ignore;;
523 ignore;;
520 A file to read per-user ignore patterns from. This file should be in
524 A file to read per-user ignore patterns from. This file should be in
521 the same format as a repository-wide .hgignore file. This option
525 the same format as a repository-wide .hgignore file. This option
522 supports hook syntax, so if you want to specify multiple ignore
526 supports hook syntax, so if you want to specify multiple ignore
523 files, you can do so by setting something like
527 files, you can do so by setting something like
524 "ignore.other = ~/.hgignore2". For details of the ignore file
528 "ignore.other = ~/.hgignore2". For details of the ignore file
525 format, see the hgignore(5) man page.
529 format, see the hgignore(5) man page.
526 interactive;;
530 interactive;;
527 Allow to prompt the user. True or False. Default is True.
531 Allow to prompt the user. True or False. Default is True.
528 logtemplate;;
532 logtemplate;;
529 Template string for commands that print changesets.
533 Template string for commands that print changesets.
530 merge;;
534 merge;;
531 The conflict resolution program to use during a manual merge.
535 The conflict resolution program to use during a manual merge.
532 There are some internal tools available:
536 There are some internal tools available:
533
537
534 internal:local;;
538 internal:local;;
535 keep the local version
539 keep the local version
536 internal:other;;
540 internal:other;;
537 use the other version
541 use the other version
538 internal:merge;;
542 internal:merge;;
539 use the internal non-interactive merge tool
543 use the internal non-interactive merge tool
540 internal:fail;;
544 internal:fail;;
541 fail to merge
545 fail to merge
542
546
543 See the merge-tools section for more information on configuring tools.
547 See the merge-tools section for more information on configuring tools.
544 patch;;
548 patch;;
545 command to use to apply patches. Look for 'gpatch' or 'patch' in PATH if
549 command to use to apply patches. Look for 'gpatch' or 'patch' in PATH if
546 unset.
550 unset.
547 quiet;;
551 quiet;;
548 Reduce the amount of output printed. True or False. Default is False.
552 Reduce the amount of output printed. True or False. Default is False.
549 remotecmd;;
553 remotecmd;;
550 remote command to use for clone/push/pull operations. Default is 'hg'.
554 remote command to use for clone/push/pull operations. Default is 'hg'.
551 report_untrusted;;
555 report_untrusted;;
552 Warn if a .hg/hgrc file is ignored due to not being owned by a
556 Warn if a .hg/hgrc file is ignored due to not being owned by a
553 trusted user or group. True or False. Default is True.
557 trusted user or group. True or False. Default is True.
554 slash;;
558 slash;;
555 Display paths using a slash ("/") as the path separator. This only
559 Display paths using a slash ("/") as the path separator. This only
556 makes a difference on systems where the default path separator is not
560 makes a difference on systems where the default path separator is not
557 the slash character (e.g. Windows uses the backslash character ("\")).
561 the slash character (e.g. Windows uses the backslash character ("\")).
558 Default is False.
562 Default is False.
559 ssh;;
563 ssh;;
560 command to use for SSH connections. Default is 'ssh'.
564 command to use for SSH connections. Default is 'ssh'.
561 strict;;
565 strict;;
562 Require exact command names, instead of allowing unambiguous
566 Require exact command names, instead of allowing unambiguous
563 abbreviations. True or False. Default is False.
567 abbreviations. True or False. Default is False.
564 style;;
568 style;;
565 Name of style to use for command output.
569 Name of style to use for command output.
566 timeout;;
570 timeout;;
567 The timeout used when a lock is held (in seconds), a negative value
571 The timeout used when a lock is held (in seconds), a negative value
568 means no timeout. Default is 600.
572 means no timeout. Default is 600.
569 username;;
573 username;;
570 The committer of a changeset created when running "commit".
574 The committer of a changeset created when running "commit".
571 Typically a person's name and email address, e.g. "Fred Widget
575 Typically a person's name and email address, e.g. "Fred Widget
572 <fred@example.com>". Default is $EMAIL or username@hostname.
576 <fred@example.com>". Default is $EMAIL or username@hostname.
573 If the username in hgrc is empty, it has to be specified manually or
577 If the username in hgrc is empty, it has to be specified manually or
574 in a different hgrc file (e.g. $HOME/.hgrc, if the admin set "username ="
578 in a different hgrc file (e.g. $HOME/.hgrc, if the admin set "username ="
575 in the system hgrc).
579 in the system hgrc).
576 verbose;;
580 verbose;;
577 Increase the amount of output printed. True or False. Default is False.
581 Increase the amount of output printed. True or False. Default is False.
578
582
579
583
580 web::
584 web::
581 Web interface configuration.
585 Web interface configuration.
582 accesslog;;
586 accesslog;;
583 Where to output the access log. Default is stdout.
587 Where to output the access log. Default is stdout.
584 address;;
588 address;;
585 Interface address to bind to. Default is all.
589 Interface address to bind to. Default is all.
586 allow_archive;;
590 allow_archive;;
587 List of archive format (bz2, gz, zip) allowed for downloading.
591 List of archive format (bz2, gz, zip) allowed for downloading.
588 Default is empty.
592 Default is empty.
589 allowbz2;;
593 allowbz2;;
590 (DEPRECATED) Whether to allow .tar.bz2 downloading of repo revisions.
594 (DEPRECATED) Whether to allow .tar.bz2 downloading of repo revisions.
591 Default is false.
595 Default is false.
592 allowgz;;
596 allowgz;;
593 (DEPRECATED) Whether to allow .tar.gz downloading of repo revisions.
597 (DEPRECATED) Whether to allow .tar.gz downloading of repo revisions.
594 Default is false.
598 Default is false.
595 allowpull;;
599 allowpull;;
596 Whether to allow pulling from the repository. Default is true.
600 Whether to allow pulling from the repository. Default is true.
597 allow_push;;
601 allow_push;;
598 Whether to allow pushing to the repository. If empty or not set,
602 Whether to allow pushing to the repository. If empty or not set,
599 push is not allowed. If the special value "*", any remote user
603 push is not allowed. If the special value "*", any remote user
600 can push, including unauthenticated users. Otherwise, the remote
604 can push, including unauthenticated users. Otherwise, the remote
601 user must have been authenticated, and the authenticated user name
605 user must have been authenticated, and the authenticated user name
602 must be present in this list (separated by whitespace or ",").
606 must be present in this list (separated by whitespace or ",").
603 The contents of the allow_push list are examined after the
607 The contents of the allow_push list are examined after the
604 deny_push list.
608 deny_push list.
605 allowzip;;
609 allowzip;;
606 (DEPRECATED) Whether to allow .zip downloading of repo revisions.
610 (DEPRECATED) Whether to allow .zip downloading of repo revisions.
607 Default is false. This feature creates temporary files.
611 Default is false. This feature creates temporary files.
608 baseurl;;
612 baseurl;;
609 Base URL to use when publishing URLs in other locations, so
613 Base URL to use when publishing URLs in other locations, so
610 third-party tools like email notification hooks can construct URLs.
614 third-party tools like email notification hooks can construct URLs.
611 Example: "http://hgserver/repos/"
615 Example: "http://hgserver/repos/"
612 contact;;
616 contact;;
613 Name or email address of the person in charge of the repository.
617 Name or email address of the person in charge of the repository.
614 Defaults to ui.username or $EMAIL or "unknown" if unset or empty.
618 Defaults to ui.username or $EMAIL or "unknown" if unset or empty.
615 deny_push;;
619 deny_push;;
616 Whether to deny pushing to the repository. If empty or not set,
620 Whether to deny pushing to the repository. If empty or not set,
617 push is not denied. If the special value "*", all remote users
621 push is not denied. If the special value "*", all remote users
618 are denied push. Otherwise, unauthenticated users are all denied,
622 are denied push. Otherwise, unauthenticated users are all denied,
619 and any authenticated user name present in this list (separated by
623 and any authenticated user name present in this list (separated by
620 whitespace or ",") is also denied. The contents of the deny_push
624 whitespace or ",") is also denied. The contents of the deny_push
621 list are examined before the allow_push list.
625 list are examined before the allow_push list.
622 description;;
626 description;;
623 Textual description of the repository's purpose or contents.
627 Textual description of the repository's purpose or contents.
624 Default is "unknown".
628 Default is "unknown".
625 encoding;;
629 encoding;;
626 Character encoding name.
630 Character encoding name.
627 Example: "UTF-8"
631 Example: "UTF-8"
628 errorlog;;
632 errorlog;;
629 Where to output the error log. Default is stderr.
633 Where to output the error log. Default is stderr.
630 hidden;;
634 hidden;;
631 Whether to hide the repository in the hgwebdir index. Default is false.
635 Whether to hide the repository in the hgwebdir index. Default is false.
632 ipv6;;
636 ipv6;;
633 Whether to use IPv6. Default is false.
637 Whether to use IPv6. Default is false.
634 name;;
638 name;;
635 Repository name to use in the web interface. Default is current
639 Repository name to use in the web interface. Default is current
636 working directory.
640 working directory.
637 maxchanges;;
641 maxchanges;;
638 Maximum number of changes to list on the changelog. Default is 10.
642 Maximum number of changes to list on the changelog. Default is 10.
639 maxfiles;;
643 maxfiles;;
640 Maximum number of files to list per changeset. Default is 10.
644 Maximum number of files to list per changeset. Default is 10.
641 port;;
645 port;;
642 Port to listen on. Default is 8000.
646 Port to listen on. Default is 8000.
643 prefix;;
647 prefix;;
644 Prefix path to serve from. Default is '' (server root).
648 Prefix path to serve from. Default is '' (server root).
645 push_ssl;;
649 push_ssl;;
646 Whether to require that inbound pushes be transported over SSL to
650 Whether to require that inbound pushes be transported over SSL to
647 prevent password sniffing. Default is true.
651 prevent password sniffing. Default is true.
648 staticurl;;
652 staticurl;;
649 Base URL to use for static files. If unset, static files (e.g.
653 Base URL to use for static files. If unset, static files (e.g.
650 the hgicon.png favicon) will be served by the CGI script itself.
654 the hgicon.png favicon) will be served by the CGI script itself.
651 Use this setting to serve them directly with the HTTP server.
655 Use this setting to serve them directly with the HTTP server.
652 Example: "http://hgserver/static/"
656 Example: "http://hgserver/static/"
653 stripes;;
657 stripes;;
654 How many lines a "zebra stripe" should span in multiline output.
658 How many lines a "zebra stripe" should span in multiline output.
655 Default is 1; set to 0 to disable.
659 Default is 1; set to 0 to disable.
656 style;;
660 style;;
657 Which template map style to use.
661 Which template map style to use.
658 templates;;
662 templates;;
659 Where to find the HTML templates. Default is install path.
663 Where to find the HTML templates. Default is install path.
660
664
661
665
662 AUTHOR
666 AUTHOR
663 ------
667 ------
664 Bryan O'Sullivan <bos@serpentine.com>.
668 Bryan O'Sullivan <bos@serpentine.com>.
665
669
666 Mercurial was written by Matt Mackall <mpm@selenic.com>.
670 Mercurial was written by Matt Mackall <mpm@selenic.com>.
667
671
668 SEE ALSO
672 SEE ALSO
669 --------
673 --------
670 hg(1), hgignore(5)
674 hg(1), hgignore(5)
671
675
672 COPYING
676 COPYING
673 -------
677 -------
674 This manual page is copyright 2005 Bryan O'Sullivan.
678 This manual page is copyright 2005 Bryan O'Sullivan.
675 Mercurial is copyright 2005-2007 Matt Mackall.
679 Mercurial is copyright 2005-2007 Matt Mackall.
676 Free use of this software is granted under the terms of the GNU General
680 Free use of this software is granted under the terms of the GNU General
677 Public License (GPL).
681 Public License (GPL).
General Comments 0
You need to be logged in to leave comments. Login now