##// END OF EJS Templates
add merge sections to hgrc.5
Steve Borho -
r6010:83d193a5 default
parent child Browse files
Show More
@@ -1,604 +1,687 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 Example for ~/.hgrc:
219 Example for ~/.hgrc:
220
220
221 [extensions]
221 [extensions]
222 # (the mq extension will get loaded from mercurial's path)
222 # (the mq extension will get loaded from mercurial's path)
223 hgext.mq =
223 hgext.mq =
224 # (this extension will get loaded from the file specified)
224 # (this extension will get loaded from the file specified)
225 myfeature = ~/.hgext/myfeature.py
225 myfeature = ~/.hgext/myfeature.py
226
226
227 format::
227 format::
228
228
229 usestore;;
229 usestore;;
230 Enable or disable the "store" repository format which improves
230 Enable or disable the "store" repository format which improves
231 compatibility with systems that fold case or otherwise mangle
231 compatibility with systems that fold case or otherwise mangle
232 filenames. Enabled by default. Disabling this option will allow
232 filenames. Enabled by default. Disabling this option will allow
233 you to store longer filenames in some situations at the expense of
233 you to store longer filenames in some situations at the expense of
234 compatibility.
234 compatibility.
235
235
236 merge-patterns::
237 This section specifies merge tools to associate with particular file
238 patterns. Tools matched here will take precedence over the default
239 merge tool. Patterns are globs by default, rooted at the repository root.
240
241 Example:
242
243 [merge-patterns]
244 **.c = kdiff3
245 **.jpg = myimgmerge
246
247 merge-tools::
248 This section configures external merge tools to use for file-level
249 merges.
250
251 Example ~/.hgrc:
252
253 [merge-tools]
254 # Override stock tool location
255 kdiff3.executable = ~/bin/kdiff3
256 # Specify command line
257 kdiff3.args = $base $local $other -o $output
258 # Give higher priority
259 kdiff3.priority = 1
260
261 # Define new tool
262 myHtmlTool.args = -m $local $other $base $output
263 myHtmlTool.regkey = Software\FooSoftware\HtmlMerge
264 myHtmlTool.priority = 1
265
266 Supported arguments:
267 priority;;
268 The priority in which to evaluate this tool.
269 Default: 0.
270 executable;;
271 Either just the name of the executable or its pathname.
272 Default: the tool name.
273 args;;
274 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,
276 $local, $other, $output.
277 Default: $local $base $other
278 premerge;;
279 Attempt to run internal non-interactive 3-way merge tool before
280 launching external tool.
281 Default: True
282 binary;;
283 This tool can merge binary files. Defaults to False, unless tool
284 was selected by file pattern match.
285 symlink;;
286 This tool can merge symlinks. Defaults to False, even if tool was
287 selected by file pattern match.
288 checkconflicts;;
289 Check whether there are conflicts even though the tool reported
290 success.
291 Default: False
292 fixeol;;
293 Attempt to fix up EOL changes caused by the merge tool.
294 Default: False
295 gui:;
296 This tool requires a graphical interface to run. Default: False
297 regkey;;
298 Windows registry key which describes install location of this tool.
299 Mercurial will search for this key first under HKEY_CURRENT_USER and
300 then under HKEY_LOCAL_MACHINE. Default: None
301 regname;;
302 Name of value to read from specified registry key. Defaults to the
303 unnamed (default) value.
304 regappend;;
305 String to append to the value read from the registry, typically the
306 executable name of the tool. Default: None
307
236 hooks::
308 hooks::
237 Commands or Python functions that get automatically executed by
309 Commands or Python functions that get automatically executed by
238 various actions such as starting or finishing a commit. Multiple
310 various actions such as starting or finishing a commit. Multiple
239 hooks can be run for the same action by appending a suffix to the
311 hooks can be run for the same action by appending a suffix to the
240 action. Overriding a site-wide hook can be done by changing its
312 action. Overriding a site-wide hook can be done by changing its
241 value or setting it to an empty string.
313 value or setting it to an empty string.
242
314
243 Example .hg/hgrc:
315 Example .hg/hgrc:
244
316
245 [hooks]
317 [hooks]
246 # do not use the site-wide hook
318 # do not use the site-wide hook
247 incoming =
319 incoming =
248 incoming.email = /my/email/hook
320 incoming.email = /my/email/hook
249 incoming.autobuild = /my/build/hook
321 incoming.autobuild = /my/build/hook
250
322
251 Most hooks are run with environment variables set that give added
323 Most hooks are run with environment variables set that give added
252 useful information. For each hook below, the environment variables
324 useful information. For each hook below, the environment variables
253 it is passed are listed with names of the form "$HG_foo".
325 it is passed are listed with names of the form "$HG_foo".
254
326
255 changegroup;;
327 changegroup;;
256 Run after a changegroup has been added via push, pull or
328 Run after a changegroup has been added via push, pull or
257 unbundle. ID of the first new changeset is in $HG_NODE. URL from
329 unbundle. ID of the first new changeset is in $HG_NODE. URL from
258 which changes came is in $HG_URL.
330 which changes came is in $HG_URL.
259 commit;;
331 commit;;
260 Run after a changeset has been created in the local repository.
332 Run after a changeset has been created in the local repository.
261 ID of the newly created changeset is in $HG_NODE. Parent
333 ID of the newly created changeset is in $HG_NODE. Parent
262 changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
334 changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
263 incoming;;
335 incoming;;
264 Run after a changeset has been pulled, pushed, or unbundled into
336 Run after a changeset has been pulled, pushed, or unbundled into
265 the local repository. The ID of the newly arrived changeset is in
337 the local repository. The ID of the newly arrived changeset is in
266 $HG_NODE. URL that was source of changes came is in $HG_URL.
338 $HG_NODE. URL that was source of changes came is in $HG_URL.
267 outgoing;;
339 outgoing;;
268 Run after sending changes from local repository to another. ID of
340 Run after sending changes from local repository to another. ID of
269 first changeset sent is in $HG_NODE. Source of operation is in
341 first changeset sent is in $HG_NODE. Source of operation is in
270 $HG_SOURCE; see "preoutgoing" hook for description.
342 $HG_SOURCE; see "preoutgoing" hook for description.
271 post-<command>;;
343 post-<command>;;
272 Run after successful invocations of the associated command. The
344 Run after successful invocations of the associated command. The
273 contents of the command line are passed as $HG_ARGS and the result
345 contents of the command line are passed as $HG_ARGS and the result
274 code in $HG_RESULT. Hook failure is ignored.
346 code in $HG_RESULT. Hook failure is ignored.
275 pre-<command>;;
347 pre-<command>;;
276 Run before executing the associated command. The contents of the
348 Run before executing the associated command. The contents of the
277 command line are passed as $HG_ARGS. If the hook returns failure,
349 command line are passed as $HG_ARGS. If the hook returns failure,
278 the command doesn't execute and Mercurial returns the failure code.
350 the command doesn't execute and Mercurial returns the failure code.
279 prechangegroup;;
351 prechangegroup;;
280 Run before a changegroup is added via push, pull or unbundle.
352 Run before a changegroup is added via push, pull or unbundle.
281 Exit status 0 allows the changegroup to proceed. Non-zero status
353 Exit status 0 allows the changegroup to proceed. Non-zero status
282 will cause the push, pull or unbundle to fail. URL from which
354 will cause the push, pull or unbundle to fail. URL from which
283 changes will come is in $HG_URL.
355 changes will come is in $HG_URL.
284 precommit;;
356 precommit;;
285 Run before starting a local commit. Exit status 0 allows the
357 Run before starting a local commit. Exit status 0 allows the
286 commit to proceed. Non-zero status will cause the commit to fail.
358 commit to proceed. Non-zero status will cause the commit to fail.
287 Parent changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
359 Parent changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
288 preoutgoing;;
360 preoutgoing;;
289 Run before collecting changes to send from the local repository to
361 Run before collecting changes to send from the local repository to
290 another. Non-zero status will cause failure. This lets you
362 another. Non-zero status will cause failure. This lets you
291 prevent pull over http or ssh. Also prevents against local pull,
363 prevent pull over http or ssh. Also prevents against local pull,
292 push (outbound) or bundle commands, but not effective, since you
364 push (outbound) or bundle commands, but not effective, since you
293 can just copy files instead then. Source of operation is in
365 can just copy files instead then. Source of operation is in
294 $HG_SOURCE. If "serve", operation is happening on behalf of
366 $HG_SOURCE. If "serve", operation is happening on behalf of
295 remote ssh or http repository. If "push", "pull" or "bundle",
367 remote ssh or http repository. If "push", "pull" or "bundle",
296 operation is happening on behalf of repository on same system.
368 operation is happening on behalf of repository on same system.
297 pretag;;
369 pretag;;
298 Run before creating a tag. Exit status 0 allows the tag to be
370 Run before creating a tag. Exit status 0 allows the tag to be
299 created. Non-zero status will cause the tag to fail. ID of
371 created. Non-zero status will cause the tag to fail. ID of
300 changeset to tag is in $HG_NODE. Name of tag is in $HG_TAG. Tag
372 changeset to tag is in $HG_NODE. Name of tag is in $HG_TAG. Tag
301 is local if $HG_LOCAL=1, in repo if $HG_LOCAL=0.
373 is local if $HG_LOCAL=1, in repo if $HG_LOCAL=0.
302 pretxnchangegroup;;
374 pretxnchangegroup;;
303 Run after a changegroup has been added via push, pull or unbundle,
375 Run after a changegroup has been added via push, pull or unbundle,
304 but before the transaction has been committed. Changegroup is
376 but before the transaction has been committed. Changegroup is
305 visible to hook program. This lets you validate incoming changes
377 visible to hook program. This lets you validate incoming changes
306 before accepting them. Passed the ID of the first new changeset
378 before accepting them. Passed the ID of the first new changeset
307 in $HG_NODE. Exit status 0 allows the transaction to commit.
379 in $HG_NODE. Exit status 0 allows the transaction to commit.
308 Non-zero status will cause the transaction to be rolled back and
380 Non-zero status will cause the transaction to be rolled back and
309 the push, pull or unbundle will fail. URL that was source of
381 the push, pull or unbundle will fail. URL that was source of
310 changes is in $HG_URL.
382 changes is in $HG_URL.
311 pretxncommit;;
383 pretxncommit;;
312 Run after a changeset has been created but the transaction not yet
384 Run after a changeset has been created but the transaction not yet
313 committed. Changeset is visible to hook program. This lets you
385 committed. Changeset is visible to hook program. This lets you
314 validate commit message and changes. Exit status 0 allows the
386 validate commit message and changes. Exit status 0 allows the
315 commit to proceed. Non-zero status will cause the transaction to
387 commit to proceed. Non-zero status will cause the transaction to
316 be rolled back. ID of changeset is in $HG_NODE. Parent changeset
388 be rolled back. ID of changeset is in $HG_NODE. Parent changeset
317 IDs are in $HG_PARENT1 and $HG_PARENT2.
389 IDs are in $HG_PARENT1 and $HG_PARENT2.
318 preupdate;;
390 preupdate;;
319 Run before updating the working directory. Exit status 0 allows
391 Run before updating the working directory. Exit status 0 allows
320 the update to proceed. Non-zero status will prevent the update.
392 the update to proceed. Non-zero status will prevent the update.
321 Changeset ID of first new parent is in $HG_PARENT1. If merge, ID
393 Changeset ID of first new parent is in $HG_PARENT1. If merge, ID
322 of second new parent is in $HG_PARENT2.
394 of second new parent is in $HG_PARENT2.
323 tag;;
395 tag;;
324 Run after a tag is created. ID of tagged changeset is in
396 Run after a tag is created. ID of tagged changeset is in
325 $HG_NODE. Name of tag is in $HG_TAG. Tag is local if
397 $HG_NODE. Name of tag is in $HG_TAG. Tag is local if
326 $HG_LOCAL=1, in repo if $HG_LOCAL=0.
398 $HG_LOCAL=1, in repo if $HG_LOCAL=0.
327 update;;
399 update;;
328 Run after updating the working directory. Changeset ID of first
400 Run after updating the working directory. Changeset ID of first
329 new parent is in $HG_PARENT1. If merge, ID of second new parent
401 new parent is in $HG_PARENT1. If merge, ID of second new parent
330 is in $HG_PARENT2. If update succeeded, $HG_ERROR=0. If update
402 is in $HG_PARENT2. If update succeeded, $HG_ERROR=0. If update
331 failed (e.g. because conflicts not resolved), $HG_ERROR=1.
403 failed (e.g. because conflicts not resolved), $HG_ERROR=1.
332
404
333 Note: it is generally better to use standard hooks rather than the
405 Note: it is generally better to use standard hooks rather than the
334 generic pre- and post- command hooks as they are guaranteed to be
406 generic pre- and post- command hooks as they are guaranteed to be
335 called in the appropriate contexts for influencing transactions.
407 called in the appropriate contexts for influencing transactions.
336 Also, hooks like "commit" will be called in all contexts that
408 Also, hooks like "commit" will be called in all contexts that
337 generate a commit (eg. tag) and not just the commit command.
409 generate a commit (eg. tag) and not just the commit command.
338
410
339 Note2: Environment variables with empty values may not be passed to
411 Note2: Environment variables with empty values may not be passed to
340 hooks on platforms like Windows. For instance, $HG_PARENT2 will
412 hooks on platforms like Windows. For instance, $HG_PARENT2 will
341 not be available under Windows for non-merge changesets while being
413 not be available under Windows for non-merge changesets while being
342 set to an empty value under Unix-like systems.
414 set to an empty value under Unix-like systems.
343
415
344 The syntax for Python hooks is as follows:
416 The syntax for Python hooks is as follows:
345
417
346 hookname = python:modulename.submodule.callable
418 hookname = python:modulename.submodule.callable
347
419
348 Python hooks are run within the Mercurial process. Each hook is
420 Python hooks are run within the Mercurial process. Each hook is
349 called with at least three keyword arguments: a ui object (keyword
421 called with at least three keyword arguments: a ui object (keyword
350 "ui"), a repository object (keyword "repo"), and a "hooktype"
422 "ui"), a repository object (keyword "repo"), and a "hooktype"
351 keyword that tells what kind of hook is used. Arguments listed as
423 keyword that tells what kind of hook is used. Arguments listed as
352 environment variables above are passed as keyword arguments, with no
424 environment variables above are passed as keyword arguments, with no
353 "HG_" prefix, and names in lower case.
425 "HG_" prefix, and names in lower case.
354
426
355 If a Python hook returns a "true" value or raises an exception, this
427 If a Python hook returns a "true" value or raises an exception, this
356 is treated as failure of the hook.
428 is treated as failure of the hook.
357
429
358 http_proxy::
430 http_proxy::
359 Used to access web-based Mercurial repositories through a HTTP
431 Used to access web-based Mercurial repositories through a HTTP
360 proxy.
432 proxy.
361 host;;
433 host;;
362 Host name and (optional) port of the proxy server, for example
434 Host name and (optional) port of the proxy server, for example
363 "myproxy:8000".
435 "myproxy:8000".
364 no;;
436 no;;
365 Optional. Comma-separated list of host names that should bypass
437 Optional. Comma-separated list of host names that should bypass
366 the proxy.
438 the proxy.
367 passwd;;
439 passwd;;
368 Optional. Password to authenticate with at the proxy server.
440 Optional. Password to authenticate with at the proxy server.
369 user;;
441 user;;
370 Optional. User name to authenticate with at the proxy server.
442 Optional. User name to authenticate with at the proxy server.
371
443
372 smtp::
444 smtp::
373 Configuration for extensions that need to send email messages.
445 Configuration for extensions that need to send email messages.
374 host;;
446 host;;
375 Host name of mail server, e.g. "mail.example.com".
447 Host name of mail server, e.g. "mail.example.com".
376 port;;
448 port;;
377 Optional. Port to connect to on mail server. Default: 25.
449 Optional. Port to connect to on mail server. Default: 25.
378 tls;;
450 tls;;
379 Optional. Whether to connect to mail server using TLS. True or
451 Optional. Whether to connect to mail server using TLS. True or
380 False. Default: False.
452 False. Default: False.
381 username;;
453 username;;
382 Optional. User name to authenticate to SMTP server with.
454 Optional. User name to authenticate to SMTP server with.
383 If username is specified, password must also be specified.
455 If username is specified, password must also be specified.
384 Default: none.
456 Default: none.
385 password;;
457 password;;
386 Optional. Password to authenticate to SMTP server with.
458 Optional. Password to authenticate to SMTP server with.
387 If username is specified, password must also be specified.
459 If username is specified, password must also be specified.
388 Default: none.
460 Default: none.
389 local_hostname;;
461 local_hostname;;
390 Optional. It's the hostname that the sender can use to identify itself
462 Optional. It's the hostname that the sender can use to identify itself
391 to the MTA.
463 to the MTA.
392
464
393 paths::
465 paths::
394 Assigns symbolic names to repositories. The left side is the
466 Assigns symbolic names to repositories. The left side is the
395 symbolic name, and the right gives the directory or URL that is the
467 symbolic name, and the right gives the directory or URL that is the
396 location of the repository. Default paths can be declared by
468 location of the repository. Default paths can be declared by
397 setting the following entries.
469 setting the following entries.
398 default;;
470 default;;
399 Directory or URL to use when pulling if no source is specified.
471 Directory or URL to use when pulling if no source is specified.
400 Default is set to repository from which the current repository
472 Default is set to repository from which the current repository
401 was cloned.
473 was cloned.
402 default-push;;
474 default-push;;
403 Optional. Directory or URL to use when pushing if no destination
475 Optional. Directory or URL to use when pushing if no destination
404 is specified.
476 is specified.
405
477
406 profile::
478 profile::
407 Configuration of profiling options, for in-depth performance
479 Configuration of profiling options, for in-depth performance
408 analysis. Mostly useful to developers.
480 analysis. Mostly useful to developers.
409 enable;;
481 enable;;
410 Enable a particular profiling mode. Useful for profiling
482 Enable a particular profiling mode. Useful for profiling
411 server-side processes. "lsprof" enables modern profiling.
483 server-side processes. "lsprof" enables modern profiling.
412 "hotshot" is deprecated, and produces less reliable results.
484 "hotshot" is deprecated, and produces less reliable results.
413 Default is no profiling.
485 Default is no profiling.
414 output;;
486 output;;
415 The name of a file to write profiling data to. Each occurrence of
487 The name of a file to write profiling data to. Each occurrence of
416 "%%p" will be replaced with the current process ID (the repeated
488 "%%p" will be replaced with the current process ID (the repeated
417 "%" protects against the config parser's string interpolator).
489 "%" protects against the config parser's string interpolator).
418 Default output is to stderr.
490 Default output is to stderr.
419
491
420 server::
492 server::
421 Controls generic server settings.
493 Controls generic server settings.
422 uncompressed;;
494 uncompressed;;
423 Whether to allow clients to clone a repo using the uncompressed
495 Whether to allow clients to clone a repo using the uncompressed
424 streaming protocol. This transfers about 40% more data than a
496 streaming protocol. This transfers about 40% more data than a
425 regular clone, but uses less memory and CPU on both server and
497 regular clone, but uses less memory and CPU on both server and
426 client. Over a LAN (100Mbps or better) or a very fast WAN, an
498 client. Over a LAN (100Mbps or better) or a very fast WAN, an
427 uncompressed streaming clone is a lot faster (~10x) than a regular
499 uncompressed streaming clone is a lot faster (~10x) than a regular
428 clone. Over most WAN connections (anything slower than about
500 clone. Over most WAN connections (anything slower than about
429 6Mbps), uncompressed streaming is slower, because of the extra
501 6Mbps), uncompressed streaming is slower, because of the extra
430 data transfer overhead. Default is False.
502 data transfer overhead. Default is False.
431
503
432 trusted::
504 trusted::
433 For security reasons, Mercurial will not use the settings in
505 For security reasons, Mercurial will not use the settings in
434 the .hg/hgrc file from a repository if it doesn't belong to a
506 the .hg/hgrc file from a repository if it doesn't belong to a
435 trusted user or to a trusted group. The main exception is the
507 trusted user or to a trusted group. The main exception is the
436 web interface, which automatically uses some safe settings, since
508 web interface, which automatically uses some safe settings, since
437 it's common to serve repositories from different users.
509 it's common to serve repositories from different users.
438
510
439 This section specifies what users and groups are trusted. The
511 This section specifies what users and groups are trusted. The
440 current user is always trusted. To trust everybody, list a user
512 current user is always trusted. To trust everybody, list a user
441 or a group with name "*".
513 or a group with name "*".
442
514
443 users;;
515 users;;
444 Comma-separated list of trusted users.
516 Comma-separated list of trusted users.
445 groups;;
517 groups;;
446 Comma-separated list of trusted groups.
518 Comma-separated list of trusted groups.
447
519
448 ui::
520 ui::
449 User interface controls.
521 User interface controls.
450 debug;;
522 debug;;
451 Print debugging information. True or False. Default is False.
523 Print debugging information. True or False. Default is False.
452 editor;;
524 editor;;
453 The editor to use during a commit. Default is $EDITOR or "vi".
525 The editor to use during a commit. Default is $EDITOR or "vi".
454 fallbackencoding;;
526 fallbackencoding;;
455 Encoding to try if it's not possible to decode the changelog using
527 Encoding to try if it's not possible to decode the changelog using
456 UTF-8. Default is ISO-8859-1.
528 UTF-8. Default is ISO-8859-1.
457 ignore;;
529 ignore;;
458 A file to read per-user ignore patterns from. This file should be in
530 A file to read per-user ignore patterns from. This file should be in
459 the same format as a repository-wide .hgignore file. This option
531 the same format as a repository-wide .hgignore file. This option
460 supports hook syntax, so if you want to specify multiple ignore
532 supports hook syntax, so if you want to specify multiple ignore
461 files, you can do so by setting something like
533 files, you can do so by setting something like
462 "ignore.other = ~/.hgignore2". For details of the ignore file
534 "ignore.other = ~/.hgignore2". For details of the ignore file
463 format, see the hgignore(5) man page.
535 format, see the hgignore(5) man page.
464 interactive;;
536 interactive;;
465 Allow to prompt the user. True or False. Default is True.
537 Allow to prompt the user. True or False. Default is True.
466 logtemplate;;
538 logtemplate;;
467 Template string for commands that print changesets.
539 Template string for commands that print changesets.
468 merge;;
540 merge;;
469 The conflict resolution program to use during a manual merge.
541 The conflict resolution program to use during a manual merge.
470 Default is "hgmerge".
542 There are some internal tools available:
543
544 internal:local;;
545 keep the local version
546 internal:other;;
547 use the other version
548 internal:merge;;
549 use the internal non-interactive merge tool
550 internal:fail;;
551 fail to merge
552
553 See the merge-tools section for more information on configuring tools.
471 patch;;
554 patch;;
472 command to use to apply patches. Look for 'gpatch' or 'patch' in PATH if
555 command to use to apply patches. Look for 'gpatch' or 'patch' in PATH if
473 unset.
556 unset.
474 quiet;;
557 quiet;;
475 Reduce the amount of output printed. True or False. Default is False.
558 Reduce the amount of output printed. True or False. Default is False.
476 remotecmd;;
559 remotecmd;;
477 remote command to use for clone/push/pull operations. Default is 'hg'.
560 remote command to use for clone/push/pull operations. Default is 'hg'.
478 report_untrusted;;
561 report_untrusted;;
479 Warn if a .hg/hgrc file is ignored due to not being owned by a
562 Warn if a .hg/hgrc file is ignored due to not being owned by a
480 trusted user or group. True or False. Default is True.
563 trusted user or group. True or False. Default is True.
481 slash;;
564 slash;;
482 Display paths using a slash ("/") as the path separator. This only
565 Display paths using a slash ("/") as the path separator. This only
483 makes a difference on systems where the default path separator is not
566 makes a difference on systems where the default path separator is not
484 the slash character (e.g. Windows uses the backslash character ("\")).
567 the slash character (e.g. Windows uses the backslash character ("\")).
485 Default is False.
568 Default is False.
486 ssh;;
569 ssh;;
487 command to use for SSH connections. Default is 'ssh'.
570 command to use for SSH connections. Default is 'ssh'.
488 strict;;
571 strict;;
489 Require exact command names, instead of allowing unambiguous
572 Require exact command names, instead of allowing unambiguous
490 abbreviations. True or False. Default is False.
573 abbreviations. True or False. Default is False.
491 style;;
574 style;;
492 Name of style to use for command output.
575 Name of style to use for command output.
493 timeout;;
576 timeout;;
494 The timeout used when a lock is held (in seconds), a negative value
577 The timeout used when a lock is held (in seconds), a negative value
495 means no timeout. Default is 600.
578 means no timeout. Default is 600.
496 username;;
579 username;;
497 The committer of a changeset created when running "commit".
580 The committer of a changeset created when running "commit".
498 Typically a person's name and email address, e.g. "Fred Widget
581 Typically a person's name and email address, e.g. "Fred Widget
499 <fred@example.com>". Default is $EMAIL or username@hostname.
582 <fred@example.com>". Default is $EMAIL or username@hostname.
500 If the username in hgrc is empty, it has to be specified manually or
583 If the username in hgrc is empty, it has to be specified manually or
501 in a different hgrc file (e.g. $HOME/.hgrc, if the admin set "username ="
584 in a different hgrc file (e.g. $HOME/.hgrc, if the admin set "username ="
502 in the system hgrc).
585 in the system hgrc).
503 verbose;;
586 verbose;;
504 Increase the amount of output printed. True or False. Default is False.
587 Increase the amount of output printed. True or False. Default is False.
505
588
506
589
507 web::
590 web::
508 Web interface configuration.
591 Web interface configuration.
509 accesslog;;
592 accesslog;;
510 Where to output the access log. Default is stdout.
593 Where to output the access log. Default is stdout.
511 address;;
594 address;;
512 Interface address to bind to. Default is all.
595 Interface address to bind to. Default is all.
513 allow_archive;;
596 allow_archive;;
514 List of archive format (bz2, gz, zip) allowed for downloading.
597 List of archive format (bz2, gz, zip) allowed for downloading.
515 Default is empty.
598 Default is empty.
516 allowbz2;;
599 allowbz2;;
517 (DEPRECATED) Whether to allow .tar.bz2 downloading of repo revisions.
600 (DEPRECATED) Whether to allow .tar.bz2 downloading of repo revisions.
518 Default is false.
601 Default is false.
519 allowgz;;
602 allowgz;;
520 (DEPRECATED) Whether to allow .tar.gz downloading of repo revisions.
603 (DEPRECATED) Whether to allow .tar.gz downloading of repo revisions.
521 Default is false.
604 Default is false.
522 allowpull;;
605 allowpull;;
523 Whether to allow pulling from the repository. Default is true.
606 Whether to allow pulling from the repository. Default is true.
524 allow_push;;
607 allow_push;;
525 Whether to allow pushing to the repository. If empty or not set,
608 Whether to allow pushing to the repository. If empty or not set,
526 push is not allowed. If the special value "*", any remote user
609 push is not allowed. If the special value "*", any remote user
527 can push, including unauthenticated users. Otherwise, the remote
610 can push, including unauthenticated users. Otherwise, the remote
528 user must have been authenticated, and the authenticated user name
611 user must have been authenticated, and the authenticated user name
529 must be present in this list (separated by whitespace or ",").
612 must be present in this list (separated by whitespace or ",").
530 The contents of the allow_push list are examined after the
613 The contents of the allow_push list are examined after the
531 deny_push list.
614 deny_push list.
532 allowzip;;
615 allowzip;;
533 (DEPRECATED) Whether to allow .zip downloading of repo revisions.
616 (DEPRECATED) Whether to allow .zip downloading of repo revisions.
534 Default is false. This feature creates temporary files.
617 Default is false. This feature creates temporary files.
535 baseurl;;
618 baseurl;;
536 Base URL to use when publishing URLs in other locations, so
619 Base URL to use when publishing URLs in other locations, so
537 third-party tools like email notification hooks can construct URLs.
620 third-party tools like email notification hooks can construct URLs.
538 Example: "http://hgserver/repos/"
621 Example: "http://hgserver/repos/"
539 contact;;
622 contact;;
540 Name or email address of the person in charge of the repository.
623 Name or email address of the person in charge of the repository.
541 Defaults to ui.username or $EMAIL or "unknown" if unset or empty.
624 Defaults to ui.username or $EMAIL or "unknown" if unset or empty.
542 deny_push;;
625 deny_push;;
543 Whether to deny pushing to the repository. If empty or not set,
626 Whether to deny pushing to the repository. If empty or not set,
544 push is not denied. If the special value "*", all remote users
627 push is not denied. If the special value "*", all remote users
545 are denied push. Otherwise, unauthenticated users are all denied,
628 are denied push. Otherwise, unauthenticated users are all denied,
546 and any authenticated user name present in this list (separated by
629 and any authenticated user name present in this list (separated by
547 whitespace or ",") is also denied. The contents of the deny_push
630 whitespace or ",") is also denied. The contents of the deny_push
548 list are examined before the allow_push list.
631 list are examined before the allow_push list.
549 description;;
632 description;;
550 Textual description of the repository's purpose or contents.
633 Textual description of the repository's purpose or contents.
551 Default is "unknown".
634 Default is "unknown".
552 encoding;;
635 encoding;;
553 Character encoding name.
636 Character encoding name.
554 Example: "UTF-8"
637 Example: "UTF-8"
555 errorlog;;
638 errorlog;;
556 Where to output the error log. Default is stderr.
639 Where to output the error log. Default is stderr.
557 hidden;;
640 hidden;;
558 Whether to hide the repository in the hgwebdir index. Default is false.
641 Whether to hide the repository in the hgwebdir index. Default is false.
559 ipv6;;
642 ipv6;;
560 Whether to use IPv6. Default is false.
643 Whether to use IPv6. Default is false.
561 name;;
644 name;;
562 Repository name to use in the web interface. Default is current
645 Repository name to use in the web interface. Default is current
563 working directory.
646 working directory.
564 maxchanges;;
647 maxchanges;;
565 Maximum number of changes to list on the changelog. Default is 10.
648 Maximum number of changes to list on the changelog. Default is 10.
566 maxfiles;;
649 maxfiles;;
567 Maximum number of files to list per changeset. Default is 10.
650 Maximum number of files to list per changeset. Default is 10.
568 port;;
651 port;;
569 Port to listen on. Default is 8000.
652 Port to listen on. Default is 8000.
570 prefix;;
653 prefix;;
571 Prefix path to serve from. Default is '' (server root).
654 Prefix path to serve from. Default is '' (server root).
572 push_ssl;;
655 push_ssl;;
573 Whether to require that inbound pushes be transported over SSL to
656 Whether to require that inbound pushes be transported over SSL to
574 prevent password sniffing. Default is true.
657 prevent password sniffing. Default is true.
575 staticurl;;
658 staticurl;;
576 Base URL to use for static files. If unset, static files (e.g.
659 Base URL to use for static files. If unset, static files (e.g.
577 the hgicon.png favicon) will be served by the CGI script itself.
660 the hgicon.png favicon) will be served by the CGI script itself.
578 Use this setting to serve them directly with the HTTP server.
661 Use this setting to serve them directly with the HTTP server.
579 Example: "http://hgserver/static/"
662 Example: "http://hgserver/static/"
580 stripes;;
663 stripes;;
581 How many lines a "zebra stripe" should span in multiline output.
664 How many lines a "zebra stripe" should span in multiline output.
582 Default is 1; set to 0 to disable.
665 Default is 1; set to 0 to disable.
583 style;;
666 style;;
584 Which template map style to use.
667 Which template map style to use.
585 templates;;
668 templates;;
586 Where to find the HTML templates. Default is install path.
669 Where to find the HTML templates. Default is install path.
587
670
588
671
589 AUTHOR
672 AUTHOR
590 ------
673 ------
591 Bryan O'Sullivan <bos@serpentine.com>.
674 Bryan O'Sullivan <bos@serpentine.com>.
592
675
593 Mercurial was written by Matt Mackall <mpm@selenic.com>.
676 Mercurial was written by Matt Mackall <mpm@selenic.com>.
594
677
595 SEE ALSO
678 SEE ALSO
596 --------
679 --------
597 hg(1), hgignore(5)
680 hg(1), hgignore(5)
598
681
599 COPYING
682 COPYING
600 -------
683 -------
601 This manual page is copyright 2005 Bryan O'Sullivan.
684 This manual page is copyright 2005 Bryan O'Sullivan.
602 Mercurial is copyright 2005-2007 Matt Mackall.
685 Mercurial is copyright 2005-2007 Matt Mackall.
603 Free use of this software is granted under the terms of the GNU General
686 Free use of this software is granted under the terms of the GNU General
604 Public License (GPL).
687 Public License (GPL).
General Comments 0
You need to be logged in to leave comments. Login now