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