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