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