Show More
@@ -1,1826 +1,1829 | |||||
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 | .. container:: verbose.unix |
|
31 | .. container:: verbose.unix | |
32 |
|
32 | |||
33 | On Unix, the following files are consulted: |
|
33 | On Unix, the following files are consulted: | |
34 |
|
34 | |||
35 | - ``<repo>/.hg/hgrc`` (per-repository) |
|
35 | - ``<repo>/.hg/hgrc`` (per-repository) | |
36 | - ``$HOME/.hgrc`` (per-user) |
|
36 | - ``$HOME/.hgrc`` (per-user) | |
37 | - ``<install-root>/etc/mercurial/hgrc`` (per-installation) |
|
37 | - ``<install-root>/etc/mercurial/hgrc`` (per-installation) | |
38 | - ``<install-root>/etc/mercurial/hgrc.d/*.rc`` (per-installation) |
|
38 | - ``<install-root>/etc/mercurial/hgrc.d/*.rc`` (per-installation) | |
39 | - ``/etc/mercurial/hgrc`` (per-system) |
|
39 | - ``/etc/mercurial/hgrc`` (per-system) | |
40 | - ``/etc/mercurial/hgrc.d/*.rc`` (per-system) |
|
40 | - ``/etc/mercurial/hgrc.d/*.rc`` (per-system) | |
41 | - ``<internal>/default.d/*.rc`` (defaults) |
|
41 | - ``<internal>/default.d/*.rc`` (defaults) | |
42 |
|
42 | |||
43 | .. container:: verbose.windows |
|
43 | .. container:: verbose.windows | |
44 |
|
44 | |||
45 | On Windows, the following files are consulted: |
|
45 | On Windows, the following files are consulted: | |
46 |
|
46 | |||
47 | - ``<repo>/.hg/hgrc`` (per-repository) |
|
47 | - ``<repo>/.hg/hgrc`` (per-repository) | |
48 | - ``%USERPROFILE%\.hgrc`` (per-user) |
|
48 | - ``%USERPROFILE%\.hgrc`` (per-user) | |
49 | - ``%USERPROFILE%\Mercurial.ini`` (per-user) |
|
49 | - ``%USERPROFILE%\Mercurial.ini`` (per-user) | |
50 | - ``%HOME%\.hgrc`` (per-user) |
|
50 | - ``%HOME%\.hgrc`` (per-user) | |
51 | - ``%HOME%\Mercurial.ini`` (per-user) |
|
51 | - ``%HOME%\Mercurial.ini`` (per-user) | |
52 | - ``<install-dir>\Mercurial.ini`` (per-installation) |
|
52 | - ``<install-dir>\Mercurial.ini`` (per-installation) | |
53 | - ``<install-dir>\hgrc.d\*.rc`` (per-installation) |
|
53 | - ``<install-dir>\hgrc.d\*.rc`` (per-installation) | |
54 | - ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` (per-installation) |
|
54 | - ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` (per-installation) | |
55 | - ``<internal>/default.d/*.rc`` (defaults) |
|
55 | - ``<internal>/default.d/*.rc`` (defaults) | |
56 |
|
56 | |||
57 | .. note:: |
|
57 | .. note:: | |
58 |
|
58 | |||
59 | The registry key ``HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial`` |
|
59 | The registry key ``HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial`` | |
60 | is used when running 32-bit Python on 64-bit Windows. |
|
60 | is used when running 32-bit Python on 64-bit Windows. | |
61 |
|
61 | |||
62 | .. container:: verbose.plan9 |
|
62 | .. container:: verbose.plan9 | |
63 |
|
63 | |||
64 | On Plan9, the following files are consulted: |
|
64 | On Plan9, the following files are consulted: | |
65 |
|
65 | |||
66 | - ``<repo>/.hg/hgrc`` (per-repository) |
|
66 | - ``<repo>/.hg/hgrc`` (per-repository) | |
67 | - ``$home/lib/hgrc`` (per-user) |
|
67 | - ``$home/lib/hgrc`` (per-user) | |
68 | - ``<install-root>/lib/mercurial/hgrc`` (per-installation) |
|
68 | - ``<install-root>/lib/mercurial/hgrc`` (per-installation) | |
69 | - ``<install-root>/lib/mercurial/hgrc.d/*.rc`` (per-installation) |
|
69 | - ``<install-root>/lib/mercurial/hgrc.d/*.rc`` (per-installation) | |
70 | - ``/lib/mercurial/hgrc`` (per-system) |
|
70 | - ``/lib/mercurial/hgrc`` (per-system) | |
71 | - ``/lib/mercurial/hgrc.d/*.rc`` (per-system) |
|
71 | - ``/lib/mercurial/hgrc.d/*.rc`` (per-system) | |
72 | - ``<internal>/default.d/*.rc`` (defaults) |
|
72 | - ``<internal>/default.d/*.rc`` (defaults) | |
73 |
|
73 | |||
74 | Per-repository configuration options only apply in a |
|
74 | Per-repository configuration options only apply in a | |
75 | particular repository. This file is not version-controlled, and |
|
75 | particular repository. This file is not version-controlled, and | |
76 | will not get transferred during a "clone" operation. Options in |
|
76 | will not get transferred during a "clone" operation. Options in | |
77 | this file override options in all other configuration files. On |
|
77 | this file override options in all other configuration files. On | |
78 | Plan 9 and Unix, most of this file will be ignored if it doesn't |
|
78 | Plan 9 and Unix, most of this file will be ignored if it doesn't | |
79 | belong to a trusted user or to a trusted group. See the documentation |
|
79 | belong to a trusted user or to a trusted group. See the documentation | |
80 | for the ``[trusted]`` section below for more details. |
|
80 | for the ``[trusted]`` section below for more details. | |
81 |
|
81 | |||
82 | Per-user configuration file(s) are for the user running Mercurial. On |
|
82 | Per-user configuration file(s) are for the user running Mercurial. On | |
83 | Windows 9x, ``%HOME%`` is replaced by ``%APPDATA%``. Options in these |
|
83 | Windows 9x, ``%HOME%`` is replaced by ``%APPDATA%``. Options in these | |
84 | files apply to all Mercurial commands executed by this user in any |
|
84 | files apply to all Mercurial commands executed by this user in any | |
85 | directory. Options in these files override per-system and per-installation |
|
85 | directory. Options in these files override per-system and per-installation | |
86 | options. |
|
86 | options. | |
87 |
|
87 | |||
88 | Per-installation configuration files are searched for in the |
|
88 | Per-installation configuration files are searched for in the | |
89 | directory where Mercurial is installed. ``<install-root>`` is the |
|
89 | directory where Mercurial is installed. ``<install-root>`` is the | |
90 | parent directory of the **hg** executable (or symlink) being run. For |
|
90 | parent directory of the **hg** executable (or symlink) being run. For | |
91 | example, if installed in ``/shared/tools/bin/hg``, Mercurial will look |
|
91 | example, if installed in ``/shared/tools/bin/hg``, Mercurial will look | |
92 | in ``/shared/tools/etc/mercurial/hgrc``. Options in these files apply |
|
92 | in ``/shared/tools/etc/mercurial/hgrc``. Options in these files apply | |
93 | to all Mercurial commands executed by any user in any directory. |
|
93 | to all Mercurial commands executed by any user in any directory. | |
94 |
|
94 | |||
95 | Per-installation configuration files are for the system on |
|
95 | Per-installation configuration files are for the system on | |
96 | which Mercurial is running. Options in these files apply to all |
|
96 | which Mercurial is running. Options in these files apply to all | |
97 | Mercurial commands executed by any user in any directory. Registry |
|
97 | Mercurial commands executed by any user in any directory. Registry | |
98 | keys contain PATH-like strings, every part of which must reference |
|
98 | keys contain PATH-like strings, every part of which must reference | |
99 | a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will |
|
99 | a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will | |
100 | be read. Mercurial checks each of these locations in the specified |
|
100 | be read. Mercurial checks each of these locations in the specified | |
101 | order until one or more configuration files are detected. |
|
101 | order until one or more configuration files are detected. | |
102 |
|
102 | |||
103 | Per-system configuration files are for the system on which Mercurial |
|
103 | Per-system configuration files are for the system on which Mercurial | |
104 | is running. Options in these files apply to all Mercurial commands |
|
104 | is running. Options in these files apply to all Mercurial commands | |
105 | executed by any user in any directory. Options in these files |
|
105 | executed by any user in any directory. Options in these files | |
106 | override per-installation options. |
|
106 | override per-installation options. | |
107 |
|
107 | |||
108 | Mercurial comes with some default configuration. The default configuration |
|
108 | Mercurial comes with some default configuration. The default configuration | |
109 | files are installed with Mercurial and will be overwritten on upgrades. Default |
|
109 | files are installed with Mercurial and will be overwritten on upgrades. Default | |
110 | configuration files should never be edited by users or administrators but can |
|
110 | configuration files should never be edited by users or administrators but can | |
111 | be overridden in other configuration files. So far the directory only contains |
|
111 | be overridden in other configuration files. So far the directory only contains | |
112 | merge tool configuration but packagers can also put other default configuration |
|
112 | merge tool configuration but packagers can also put other default configuration | |
113 | there. |
|
113 | there. | |
114 |
|
114 | |||
115 | Syntax |
|
115 | Syntax | |
116 | ====== |
|
116 | ====== | |
117 |
|
117 | |||
118 | A configuration file consists of sections, led by a ``[section]`` header |
|
118 | A configuration file consists of sections, led by a ``[section]`` header | |
119 | and followed by ``name = value`` entries (sometimes called |
|
119 | and followed by ``name = value`` entries (sometimes called | |
120 | ``configuration keys``):: |
|
120 | ``configuration keys``):: | |
121 |
|
121 | |||
122 | [spam] |
|
122 | [spam] | |
123 | eggs=ham |
|
123 | eggs=ham | |
124 | green= |
|
124 | green= | |
125 | eggs |
|
125 | eggs | |
126 |
|
126 | |||
127 | Each line contains one entry. If the lines that follow are indented, |
|
127 | Each line contains one entry. If the lines that follow are indented, | |
128 | they are treated as continuations of that entry. Leading whitespace is |
|
128 | they are treated as continuations of that entry. Leading whitespace is | |
129 | removed from values. Empty lines are skipped. Lines beginning with |
|
129 | removed from values. Empty lines are skipped. Lines beginning with | |
130 | ``#`` or ``;`` are ignored and may be used to provide comments. |
|
130 | ``#`` or ``;`` are ignored and may be used to provide comments. | |
131 |
|
131 | |||
132 | Configuration keys can be set multiple times, in which case Mercurial |
|
132 | Configuration keys can be set multiple times, in which case Mercurial | |
133 | will use the value that was configured last. As an example:: |
|
133 | will use the value that was configured last. As an example:: | |
134 |
|
134 | |||
135 | [spam] |
|
135 | [spam] | |
136 | eggs=large |
|
136 | eggs=large | |
137 | ham=serrano |
|
137 | ham=serrano | |
138 | eggs=small |
|
138 | eggs=small | |
139 |
|
139 | |||
140 | This would set the configuration key named ``eggs`` to ``small``. |
|
140 | This would set the configuration key named ``eggs`` to ``small``. | |
141 |
|
141 | |||
142 | It is also possible to define a section multiple times. A section can |
|
142 | It is also possible to define a section multiple times. A section can | |
143 | be redefined on the same and/or on different configuration files. For |
|
143 | be redefined on the same and/or on different configuration files. For | |
144 | example:: |
|
144 | example:: | |
145 |
|
145 | |||
146 | [foo] |
|
146 | [foo] | |
147 | eggs=large |
|
147 | eggs=large | |
148 | ham=serrano |
|
148 | ham=serrano | |
149 | eggs=small |
|
149 | eggs=small | |
150 |
|
150 | |||
151 | [bar] |
|
151 | [bar] | |
152 | eggs=ham |
|
152 | eggs=ham | |
153 | green= |
|
153 | green= | |
154 | eggs |
|
154 | eggs | |
155 |
|
155 | |||
156 | [foo] |
|
156 | [foo] | |
157 | ham=prosciutto |
|
157 | ham=prosciutto | |
158 | eggs=medium |
|
158 | eggs=medium | |
159 | bread=toasted |
|
159 | bread=toasted | |
160 |
|
160 | |||
161 | This would set the ``eggs``, ``ham``, and ``bread`` configuration keys |
|
161 | This would set the ``eggs``, ``ham``, and ``bread`` configuration keys | |
162 | of the ``foo`` section to ``medium``, ``prosciutto``, and ``toasted``, |
|
162 | of the ``foo`` section to ``medium``, ``prosciutto``, and ``toasted``, | |
163 | respectively. As you can see there only thing that matters is the last |
|
163 | respectively. As you can see there only thing that matters is the last | |
164 | value that was set for each of the configuration keys. |
|
164 | value that was set for each of the configuration keys. | |
165 |
|
165 | |||
166 | If a configuration key is set multiple times in different |
|
166 | If a configuration key is set multiple times in different | |
167 | configuration files the final value will depend on the order in which |
|
167 | configuration files the final value will depend on the order in which | |
168 | the different configuration files are read, with settings from earlier |
|
168 | the different configuration files are read, with settings from earlier | |
169 | paths overriding later ones as described on the ``Files`` section |
|
169 | paths overriding later ones as described on the ``Files`` section | |
170 | above. |
|
170 | above. | |
171 |
|
171 | |||
172 | A line of the form ``%include file`` will include ``file`` into the |
|
172 | A line of the form ``%include file`` will include ``file`` into the | |
173 | current configuration file. The inclusion is recursive, which means |
|
173 | current configuration file. The inclusion is recursive, which means | |
174 | that included files can include other files. Filenames are relative to |
|
174 | that included files can include other files. Filenames are relative to | |
175 | the configuration file in which the ``%include`` directive is found. |
|
175 | the configuration file in which the ``%include`` directive is found. | |
176 | Environment variables and ``~user`` constructs are expanded in |
|
176 | Environment variables and ``~user`` constructs are expanded in | |
177 | ``file``. This lets you do something like:: |
|
177 | ``file``. This lets you do something like:: | |
178 |
|
178 | |||
179 | %include ~/.hgrc.d/$HOST.rc |
|
179 | %include ~/.hgrc.d/$HOST.rc | |
180 |
|
180 | |||
181 | to include a different configuration file on each computer you use. |
|
181 | to include a different configuration file on each computer you use. | |
182 |
|
182 | |||
183 | A line with ``%unset name`` will remove ``name`` from the current |
|
183 | A line with ``%unset name`` will remove ``name`` from the current | |
184 | section, if it has been set previously. |
|
184 | section, if it has been set previously. | |
185 |
|
185 | |||
186 | The values are either free-form text strings, lists of text strings, |
|
186 | The values are either free-form text strings, lists of text strings, | |
187 | or Boolean values. Boolean values can be set to true using any of "1", |
|
187 | or Boolean values. Boolean values can be set to true using any of "1", | |
188 | "yes", "true", or "on" and to false using "0", "no", "false", or "off" |
|
188 | "yes", "true", or "on" and to false using "0", "no", "false", or "off" | |
189 | (all case insensitive). |
|
189 | (all case insensitive). | |
190 |
|
190 | |||
191 | List values are separated by whitespace or comma, except when values are |
|
191 | List values are separated by whitespace or comma, except when values are | |
192 | placed in double quotation marks:: |
|
192 | placed in double quotation marks:: | |
193 |
|
193 | |||
194 | allow_read = "John Doe, PhD", brian, betty |
|
194 | allow_read = "John Doe, PhD", brian, betty | |
195 |
|
195 | |||
196 | Quotation marks can be escaped by prefixing them with a backslash. Only |
|
196 | Quotation marks can be escaped by prefixing them with a backslash. Only | |
197 | quotation marks at the beginning of a word is counted as a quotation |
|
197 | quotation marks at the beginning of a word is counted as a quotation | |
198 | (e.g., ``foo"bar baz`` is the list of ``foo"bar`` and ``baz``). |
|
198 | (e.g., ``foo"bar baz`` is the list of ``foo"bar`` and ``baz``). | |
199 |
|
199 | |||
200 | Sections |
|
200 | Sections | |
201 | ======== |
|
201 | ======== | |
202 |
|
202 | |||
203 | This section describes the different sections that may appear in a |
|
203 | This section describes the different sections that may appear in a | |
204 | Mercurial configuration file, the purpose of each section, its possible |
|
204 | Mercurial configuration file, the purpose of each section, its possible | |
205 | keys, and their possible values. |
|
205 | keys, and their possible values. | |
206 |
|
206 | |||
207 | ``alias`` |
|
207 | ``alias`` | |
208 | --------- |
|
208 | --------- | |
209 |
|
209 | |||
210 | Defines command aliases. |
|
210 | Defines command aliases. | |
|
211 | ||||
211 | Aliases allow you to define your own commands in terms of other |
|
212 | Aliases allow you to define your own commands in terms of other | |
212 | commands (or aliases), optionally including arguments. Positional |
|
213 | commands (or aliases), optionally including arguments. Positional | |
213 | arguments in the form of ``$1``, ``$2``, etc in the alias definition |
|
214 | arguments in the form of ``$1``, ``$2``, etc in the alias definition | |
214 | are expanded by Mercurial before execution. Positional arguments not |
|
215 | are expanded by Mercurial before execution. Positional arguments not | |
215 | already used by ``$N`` in the definition are put at the end of the |
|
216 | already used by ``$N`` in the definition are put at the end of the | |
216 | command to be executed. |
|
217 | command to be executed. | |
217 |
|
218 | |||
218 | Alias definitions consist of lines of the form:: |
|
219 | Alias definitions consist of lines of the form:: | |
219 |
|
220 | |||
220 | <alias> = <command> [<argument>]... |
|
221 | <alias> = <command> [<argument>]... | |
221 |
|
222 | |||
222 | For example, this definition:: |
|
223 | For example, this definition:: | |
223 |
|
224 | |||
224 | latest = log --limit 5 |
|
225 | latest = log --limit 5 | |
225 |
|
226 | |||
226 | creates a new command ``latest`` that shows only the five most recent |
|
227 | creates a new command ``latest`` that shows only the five most recent | |
227 | changesets. You can define subsequent aliases using earlier ones:: |
|
228 | changesets. You can define subsequent aliases using earlier ones:: | |
228 |
|
229 | |||
229 | stable5 = latest -b stable |
|
230 | stable5 = latest -b stable | |
230 |
|
231 | |||
231 | .. note:: |
|
232 | .. note:: | |
232 |
|
233 | |||
233 | It is possible to create aliases with the same names as |
|
234 | It is possible to create aliases with the same names as | |
234 | existing commands, which will then override the original |
|
235 | existing commands, which will then override the original | |
235 | definitions. This is almost always a bad idea! |
|
236 | definitions. This is almost always a bad idea! | |
236 |
|
237 | |||
237 | An alias can start with an exclamation point (``!``) to make it a |
|
238 | An alias can start with an exclamation point (``!``) to make it a | |
238 | shell alias. A shell alias is executed with the shell and will let you |
|
239 | shell alias. A shell alias is executed with the shell and will let you | |
239 | run arbitrary commands. As an example, :: |
|
240 | run arbitrary commands. As an example, :: | |
240 |
|
241 | |||
241 | echo = !echo $@ |
|
242 | echo = !echo $@ | |
242 |
|
243 | |||
243 | will let you do ``hg echo foo`` to have ``foo`` printed in your |
|
244 | will let you do ``hg echo foo`` to have ``foo`` printed in your | |
244 | terminal. A better example might be:: |
|
245 | terminal. A better example might be:: | |
245 |
|
246 | |||
246 | purge = !$HG status --no-status --unknown -0 | xargs -0 rm |
|
247 | purge = !$HG status --no-status --unknown -0 | xargs -0 rm | |
247 |
|
248 | |||
248 | which will make ``hg purge`` delete all unknown files in the |
|
249 | which will make ``hg purge`` delete all unknown files in the | |
249 | repository in the same manner as the purge extension. |
|
250 | repository in the same manner as the purge extension. | |
250 |
|
251 | |||
251 | Positional arguments like ``$1``, ``$2``, etc. in the alias definition |
|
252 | Positional arguments like ``$1``, ``$2``, etc. in the alias definition | |
252 | expand to the command arguments. Unmatched arguments are |
|
253 | expand to the command arguments. Unmatched arguments are | |
253 | removed. ``$0`` expands to the alias name and ``$@`` expands to all |
|
254 | removed. ``$0`` expands to the alias name and ``$@`` expands to all | |
254 | arguments separated by a space. ``"$@"`` (with quotes) expands to all |
|
255 | arguments separated by a space. ``"$@"`` (with quotes) expands to all | |
255 | arguments quoted individually and separated by a space. These expansions |
|
256 | arguments quoted individually and separated by a space. These expansions | |
256 | happen before the command is passed to the shell. |
|
257 | happen before the command is passed to the shell. | |
257 |
|
258 | |||
258 | Shell aliases are executed in an environment where ``$HG`` expands to |
|
259 | Shell aliases are executed in an environment where ``$HG`` expands to | |
259 | the path of the Mercurial that was used to execute the alias. This is |
|
260 | the path of the Mercurial that was used to execute the alias. This is | |
260 | useful when you want to call further Mercurial commands in a shell |
|
261 | useful when you want to call further Mercurial commands in a shell | |
261 | alias, as was done above for the purge alias. In addition, |
|
262 | alias, as was done above for the purge alias. In addition, | |
262 | ``$HG_ARGS`` expands to the arguments given to Mercurial. In the ``hg |
|
263 | ``$HG_ARGS`` expands to the arguments given to Mercurial. In the ``hg | |
263 | echo foo`` call above, ``$HG_ARGS`` would expand to ``echo foo``. |
|
264 | echo foo`` call above, ``$HG_ARGS`` would expand to ``echo foo``. | |
264 |
|
265 | |||
265 | .. note:: |
|
266 | .. note:: | |
266 |
|
267 | |||
267 | Some global configuration options such as ``-R`` are |
|
268 | Some global configuration options such as ``-R`` are | |
268 | processed before shell aliases and will thus not be passed to |
|
269 | processed before shell aliases and will thus not be passed to | |
269 | aliases. |
|
270 | aliases. | |
270 |
|
271 | |||
271 |
|
272 | |||
272 | ``annotate`` |
|
273 | ``annotate`` | |
273 | ------------ |
|
274 | ------------ | |
274 |
|
275 | |||
275 | Settings used when displaying file annotations. All values are |
|
276 | Settings used when displaying file annotations. All values are | |
276 | Booleans and default to False. See ``diff`` section for related |
|
277 | Booleans and default to False. See ``diff`` section for related | |
277 | options for the diff command. |
|
278 | options for the diff command. | |
278 |
|
279 | |||
279 | ``ignorews`` |
|
280 | ``ignorews`` | |
280 | Ignore white space when comparing lines. |
|
281 | Ignore white space when comparing lines. | |
281 |
|
282 | |||
282 | ``ignorewsamount`` |
|
283 | ``ignorewsamount`` | |
283 | Ignore changes in the amount of white space. |
|
284 | Ignore changes in the amount of white space. | |
284 |
|
285 | |||
285 | ``ignoreblanklines`` |
|
286 | ``ignoreblanklines`` | |
286 | Ignore changes whose lines are all blank. |
|
287 | Ignore changes whose lines are all blank. | |
287 |
|
288 | |||
288 |
|
289 | |||
289 | ``auth`` |
|
290 | ``auth`` | |
290 | -------- |
|
291 | -------- | |
291 |
|
292 | |||
292 | Authentication credentials for HTTP authentication. This section |
|
293 | Authentication credentials for HTTP authentication. This section | |
293 | allows you to store usernames and passwords for use when logging |
|
294 | allows you to store usernames and passwords for use when logging | |
294 | *into* HTTP servers. See the ``[web]`` configuration section if |
|
295 | *into* HTTP servers. See the ``[web]`` configuration section if | |
295 | you want to configure *who* can login to your HTTP server. |
|
296 | you want to configure *who* can login to your HTTP server. | |
296 |
|
297 | |||
297 | Each line has the following format:: |
|
298 | Each line has the following format:: | |
298 |
|
299 | |||
299 | <name>.<argument> = <value> |
|
300 | <name>.<argument> = <value> | |
300 |
|
301 | |||
301 | where ``<name>`` is used to group arguments into authentication |
|
302 | where ``<name>`` is used to group arguments into authentication | |
302 | entries. Example:: |
|
303 | entries. Example:: | |
303 |
|
304 | |||
304 | foo.prefix = hg.intevation.org/mercurial |
|
305 | foo.prefix = hg.intevation.org/mercurial | |
305 | foo.username = foo |
|
306 | foo.username = foo | |
306 | foo.password = bar |
|
307 | foo.password = bar | |
307 | foo.schemes = http https |
|
308 | foo.schemes = http https | |
308 |
|
309 | |||
309 | bar.prefix = secure.example.org |
|
310 | bar.prefix = secure.example.org | |
310 | bar.key = path/to/file.key |
|
311 | bar.key = path/to/file.key | |
311 | bar.cert = path/to/file.cert |
|
312 | bar.cert = path/to/file.cert | |
312 | bar.schemes = https |
|
313 | bar.schemes = https | |
313 |
|
314 | |||
314 | Supported arguments: |
|
315 | Supported arguments: | |
315 |
|
316 | |||
316 | ``prefix`` |
|
317 | ``prefix`` | |
317 | Either ``*`` or a URI prefix with or without the scheme part. |
|
318 | Either ``*`` or a URI prefix with or without the scheme part. | |
318 | The authentication entry with the longest matching prefix is used |
|
319 | The authentication entry with the longest matching prefix is used | |
319 | (where ``*`` matches everything and counts as a match of length |
|
320 | (where ``*`` matches everything and counts as a match of length | |
320 | 1). If the prefix doesn't include a scheme, the match is performed |
|
321 | 1). If the prefix doesn't include a scheme, the match is performed | |
321 | against the URI with its scheme stripped as well, and the schemes |
|
322 | against the URI with its scheme stripped as well, and the schemes | |
322 | argument, q.v., is then subsequently consulted. |
|
323 | argument, q.v., is then subsequently consulted. | |
323 |
|
324 | |||
324 | ``username`` |
|
325 | ``username`` | |
325 | Optional. Username to authenticate with. If not given, and the |
|
326 | Optional. Username to authenticate with. If not given, and the | |
326 | remote site requires basic or digest authentication, the user will |
|
327 | remote site requires basic or digest authentication, the user will | |
327 | be prompted for it. Environment variables are expanded in the |
|
328 | be prompted for it. Environment variables are expanded in the | |
328 | username letting you do ``foo.username = $USER``. If the URI |
|
329 | username letting you do ``foo.username = $USER``. If the URI | |
329 | includes a username, only ``[auth]`` entries with a matching |
|
330 | includes a username, only ``[auth]`` entries with a matching | |
330 | username or without a username will be considered. |
|
331 | username or without a username will be considered. | |
331 |
|
332 | |||
332 | ``password`` |
|
333 | ``password`` | |
333 | Optional. Password to authenticate with. If not given, and the |
|
334 | Optional. Password to authenticate with. If not given, and the | |
334 | remote site requires basic or digest authentication, the user |
|
335 | remote site requires basic or digest authentication, the user | |
335 | will be prompted for it. |
|
336 | will be prompted for it. | |
336 |
|
337 | |||
337 | ``key`` |
|
338 | ``key`` | |
338 | Optional. PEM encoded client certificate key file. Environment |
|
339 | Optional. PEM encoded client certificate key file. Environment | |
339 | variables are expanded in the filename. |
|
340 | variables are expanded in the filename. | |
340 |
|
341 | |||
341 | ``cert`` |
|
342 | ``cert`` | |
342 | Optional. PEM encoded client certificate chain file. Environment |
|
343 | Optional. PEM encoded client certificate chain file. Environment | |
343 | variables are expanded in the filename. |
|
344 | variables are expanded in the filename. | |
344 |
|
345 | |||
345 | ``schemes`` |
|
346 | ``schemes`` | |
346 | Optional. Space separated list of URI schemes to use this |
|
347 | Optional. Space separated list of URI schemes to use this | |
347 | authentication entry with. Only used if the prefix doesn't include |
|
348 | authentication entry with. Only used if the prefix doesn't include | |
348 | a scheme. Supported schemes are http and https. They will match |
|
349 | a scheme. Supported schemes are http and https. They will match | |
349 | static-http and static-https respectively, as well. |
|
350 | static-http and static-https respectively, as well. | |
350 | Default: https. |
|
351 | Default: https. | |
351 |
|
352 | |||
352 | If no suitable authentication entry is found, the user is prompted |
|
353 | If no suitable authentication entry is found, the user is prompted | |
353 | for credentials as usual if required by the remote. |
|
354 | for credentials as usual if required by the remote. | |
354 |
|
355 | |||
355 |
|
356 | |||
356 | ``committemplate`` |
|
357 | ``committemplate`` | |
357 | ------------------ |
|
358 | ------------------ | |
358 |
|
359 | |||
359 | ``changeset`` |
|
360 | ``changeset`` | |
360 | String: configuration in this section is used as the template to |
|
361 | String: configuration in this section is used as the template to | |
361 | customize the text shown in the editor when committing. |
|
362 | customize the text shown in the editor when committing. | |
362 |
|
363 | |||
363 | In addition to pre-defined template keywords, commit log specific one |
|
364 | In addition to pre-defined template keywords, commit log specific one | |
364 | below can be used for customization: |
|
365 | below can be used for customization: | |
365 |
|
366 | |||
366 | ``extramsg`` |
|
367 | ``extramsg`` | |
367 | String: Extra message (typically 'Leave message empty to abort |
|
368 | String: Extra message (typically 'Leave message empty to abort | |
368 | commit.'). This may be changed by some commands or extensions. |
|
369 | commit.'). This may be changed by some commands or extensions. | |
369 |
|
370 | |||
370 | For example, the template configuration below shows as same text as |
|
371 | For example, the template configuration below shows as same text as | |
371 | one shown by default:: |
|
372 | one shown by default:: | |
372 |
|
373 | |||
373 | [committemplate] |
|
374 | [committemplate] | |
374 | changeset = {desc}\n\n |
|
375 | changeset = {desc}\n\n | |
375 | HG: Enter commit message. Lines beginning with 'HG:' are removed. |
|
376 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
376 | HG: {extramsg} |
|
377 | HG: {extramsg} | |
377 | HG: -- |
|
378 | HG: -- | |
378 | HG: user: {author}\n{ifeq(p2rev, "-1", "", |
|
379 | HG: user: {author}\n{ifeq(p2rev, "-1", "", | |
379 | "HG: branch merge\n") |
|
380 | "HG: branch merge\n") | |
380 | }HG: branch '{branch}'\n{if(activebookmark, |
|
381 | }HG: branch '{branch}'\n{if(activebookmark, | |
381 | "HG: bookmark '{activebookmark}'\n") }{subrepos % |
|
382 | "HG: bookmark '{activebookmark}'\n") }{subrepos % | |
382 | "HG: subrepo {subrepo}\n" }{file_adds % |
|
383 | "HG: subrepo {subrepo}\n" }{file_adds % | |
383 | "HG: added {file}\n" }{file_mods % |
|
384 | "HG: added {file}\n" }{file_mods % | |
384 | "HG: changed {file}\n" }{file_dels % |
|
385 | "HG: changed {file}\n" }{file_dels % | |
385 | "HG: removed {file}\n" }{if(files, "", |
|
386 | "HG: removed {file}\n" }{if(files, "", | |
386 | "HG: no files changed\n")} |
|
387 | "HG: no files changed\n")} | |
387 |
|
388 | |||
388 | .. note:: |
|
389 | .. note:: | |
389 |
|
390 | |||
390 | For some problematic encodings (see :hg:`help win32mbcs` for |
|
391 | For some problematic encodings (see :hg:`help win32mbcs` for | |
391 | detail), this customization should be configured carefully, to |
|
392 | detail), this customization should be configured carefully, to | |
392 | avoid showing broken characters. |
|
393 | avoid showing broken characters. | |
393 |
|
394 | |||
394 | For example, if multibyte character ending with backslash (0x5c) is |
|
395 | For example, if multibyte character ending with backslash (0x5c) is | |
395 | followed by ASCII character 'n' in the customized template, |
|
396 | followed by ASCII character 'n' in the customized template, | |
396 | sequence of backslash and 'n' is treated as line-feed unexpectedly |
|
397 | sequence of backslash and 'n' is treated as line-feed unexpectedly | |
397 | (and multibyte character is broken, too). |
|
398 | (and multibyte character is broken, too). | |
398 |
|
399 | |||
399 | Customized template is used for commands below (``--edit`` may be |
|
400 | Customized template is used for commands below (``--edit`` may be | |
400 | required): |
|
401 | required): | |
401 |
|
402 | |||
402 | - :hg:`backout` |
|
403 | - :hg:`backout` | |
403 | - :hg:`commit` |
|
404 | - :hg:`commit` | |
404 | - :hg:`fetch` (for merge commit only) |
|
405 | - :hg:`fetch` (for merge commit only) | |
405 | - :hg:`graft` |
|
406 | - :hg:`graft` | |
406 | - :hg:`histedit` |
|
407 | - :hg:`histedit` | |
407 | - :hg:`import` |
|
408 | - :hg:`import` | |
408 | - :hg:`qfold`, :hg:`qnew` and :hg:`qrefresh` |
|
409 | - :hg:`qfold`, :hg:`qnew` and :hg:`qrefresh` | |
409 | - :hg:`rebase` |
|
410 | - :hg:`rebase` | |
410 | - :hg:`shelve` |
|
411 | - :hg:`shelve` | |
411 | - :hg:`sign` |
|
412 | - :hg:`sign` | |
412 | - :hg:`tag` |
|
413 | - :hg:`tag` | |
413 | - :hg:`transplant` |
|
414 | - :hg:`transplant` | |
414 |
|
415 | |||
415 | Configuring items below instead of ``changeset`` allows showing |
|
416 | Configuring items below instead of ``changeset`` allows showing | |
416 | customized message only for specific actions, or showing different |
|
417 | customized message only for specific actions, or showing different | |
417 | messages for each action. |
|
418 | messages for each action. | |
418 |
|
419 | |||
419 | - ``changeset.backout`` for :hg:`backout` |
|
420 | - ``changeset.backout`` for :hg:`backout` | |
420 | - ``changeset.commit.amend.merge`` for :hg:`commit --amend` on merges |
|
421 | - ``changeset.commit.amend.merge`` for :hg:`commit --amend` on merges | |
421 | - ``changeset.commit.amend.normal`` for :hg:`commit --amend` on other |
|
422 | - ``changeset.commit.amend.normal`` for :hg:`commit --amend` on other | |
422 | - ``changeset.commit.normal.merge`` for :hg:`commit` on merges |
|
423 | - ``changeset.commit.normal.merge`` for :hg:`commit` on merges | |
423 | - ``changeset.commit.normal.normal`` for :hg:`commit` on other |
|
424 | - ``changeset.commit.normal.normal`` for :hg:`commit` on other | |
424 | - ``changeset.fetch`` for :hg:`fetch` (impling merge commit) |
|
425 | - ``changeset.fetch`` for :hg:`fetch` (impling merge commit) | |
425 | - ``changeset.gpg.sign`` for :hg:`sign` |
|
426 | - ``changeset.gpg.sign`` for :hg:`sign` | |
426 | - ``changeset.graft`` for :hg:`graft` |
|
427 | - ``changeset.graft`` for :hg:`graft` | |
427 | - ``changeset.histedit.edit`` for ``edit`` of :hg:`histedit` |
|
428 | - ``changeset.histedit.edit`` for ``edit`` of :hg:`histedit` | |
428 | - ``changeset.histedit.fold`` for ``fold`` of :hg:`histedit` |
|
429 | - ``changeset.histedit.fold`` for ``fold`` of :hg:`histedit` | |
429 | - ``changeset.histedit.mess`` for ``mess`` of :hg:`histedit` |
|
430 | - ``changeset.histedit.mess`` for ``mess`` of :hg:`histedit` | |
430 | - ``changeset.histedit.pick`` for ``pick`` of :hg:`histedit` |
|
431 | - ``changeset.histedit.pick`` for ``pick`` of :hg:`histedit` | |
431 | - ``changeset.import.bypass`` for :hg:`import --bypass` |
|
432 | - ``changeset.import.bypass`` for :hg:`import --bypass` | |
432 | - ``changeset.import.normal.merge`` for :hg:`import` on merges |
|
433 | - ``changeset.import.normal.merge`` for :hg:`import` on merges | |
433 | - ``changeset.import.normal.normal`` for :hg:`import` on other |
|
434 | - ``changeset.import.normal.normal`` for :hg:`import` on other | |
434 | - ``changeset.mq.qnew`` for :hg:`qnew` |
|
435 | - ``changeset.mq.qnew`` for :hg:`qnew` | |
435 | - ``changeset.mq.qfold`` for :hg:`qfold` |
|
436 | - ``changeset.mq.qfold`` for :hg:`qfold` | |
436 | - ``changeset.mq.qrefresh`` for :hg:`qrefresh` |
|
437 | - ``changeset.mq.qrefresh`` for :hg:`qrefresh` | |
437 | - ``changeset.rebase.collapse`` for :hg:`rebase --collapse` |
|
438 | - ``changeset.rebase.collapse`` for :hg:`rebase --collapse` | |
438 | - ``changeset.rebase.merge`` for :hg:`rebase` on merges |
|
439 | - ``changeset.rebase.merge`` for :hg:`rebase` on merges | |
439 | - ``changeset.rebase.normal`` for :hg:`rebase` on other |
|
440 | - ``changeset.rebase.normal`` for :hg:`rebase` on other | |
440 | - ``changeset.shelve.shelve`` for :hg:`shelve` |
|
441 | - ``changeset.shelve.shelve`` for :hg:`shelve` | |
441 | - ``changeset.tag.add`` for :hg:`tag` without ``--remove`` |
|
442 | - ``changeset.tag.add`` for :hg:`tag` without ``--remove`` | |
442 | - ``changeset.tag.remove`` for :hg:`tag --remove` |
|
443 | - ``changeset.tag.remove`` for :hg:`tag --remove` | |
443 | - ``changeset.transplant.merge`` for :hg:`transplant` on merges |
|
444 | - ``changeset.transplant.merge`` for :hg:`transplant` on merges | |
444 | - ``changeset.transplant.normal`` for :hg:`transplant` on other |
|
445 | - ``changeset.transplant.normal`` for :hg:`transplant` on other | |
445 |
|
446 | |||
446 | These dot-separated lists of names are treated as hierarchical ones. |
|
447 | These dot-separated lists of names are treated as hierarchical ones. | |
447 | For example, ``changeset.tag.remove`` customizes the commit message |
|
448 | For example, ``changeset.tag.remove`` customizes the commit message | |
448 | only for :hg:`tag --remove`, but ``changeset.tag`` customizes the |
|
449 | only for :hg:`tag --remove`, but ``changeset.tag`` customizes the | |
449 | commit message for :hg:`tag` regardless of ``--remove`` option. |
|
450 | commit message for :hg:`tag` regardless of ``--remove`` option. | |
450 |
|
451 | |||
451 | At the external editor invocation for committing, corresponding |
|
452 | At the external editor invocation for committing, corresponding | |
452 | dot-separated list of names without ``changeset.`` prefix |
|
453 | dot-separated list of names without ``changeset.`` prefix | |
453 | (e.g. ``commit.normal.normal``) is in ``HGEDITFORM`` environment variable. |
|
454 | (e.g. ``commit.normal.normal``) is in ``HGEDITFORM`` environment variable. | |
454 |
|
455 | |||
455 | In this section, items other than ``changeset`` can be referred from |
|
456 | In this section, items other than ``changeset`` can be referred from | |
456 | others. For example, the configuration to list committed files up |
|
457 | others. For example, the configuration to list committed files up | |
457 | below can be referred as ``{listupfiles}``:: |
|
458 | below can be referred as ``{listupfiles}``:: | |
458 |
|
459 | |||
459 | [committemplate] |
|
460 | [committemplate] | |
460 | listupfiles = {file_adds % |
|
461 | listupfiles = {file_adds % | |
461 | "HG: added {file}\n" }{file_mods % |
|
462 | "HG: added {file}\n" }{file_mods % | |
462 | "HG: changed {file}\n" }{file_dels % |
|
463 | "HG: changed {file}\n" }{file_dels % | |
463 | "HG: removed {file}\n" }{if(files, "", |
|
464 | "HG: removed {file}\n" }{if(files, "", | |
464 | "HG: no files changed\n")} |
|
465 | "HG: no files changed\n")} | |
465 |
|
466 | |||
466 | ``decode/encode`` |
|
467 | ``decode/encode`` | |
467 | ----------------- |
|
468 | ----------------- | |
468 |
|
469 | |||
469 | Filters for transforming files on checkout/checkin. This would |
|
470 | Filters for transforming files on checkout/checkin. This would | |
470 | typically be used for newline processing or other |
|
471 | typically be used for newline processing or other | |
471 | localization/canonicalization of files. |
|
472 | localization/canonicalization of files. | |
472 |
|
473 | |||
473 | Filters consist of a filter pattern followed by a filter command. |
|
474 | Filters consist of a filter pattern followed by a filter command. | |
474 | Filter patterns are globs by default, rooted at the repository root. |
|
475 | Filter patterns are globs by default, rooted at the repository root. | |
475 | For example, to match any file ending in ``.txt`` in the root |
|
476 | For example, to match any file ending in ``.txt`` in the root | |
476 | directory only, use the pattern ``*.txt``. To match any file ending |
|
477 | directory only, use the pattern ``*.txt``. To match any file ending | |
477 | in ``.c`` anywhere in the repository, use the pattern ``**.c``. |
|
478 | in ``.c`` anywhere in the repository, use the pattern ``**.c``. | |
478 | For each file only the first matching filter applies. |
|
479 | For each file only the first matching filter applies. | |
479 |
|
480 | |||
480 | The filter command can start with a specifier, either ``pipe:`` or |
|
481 | The filter command can start with a specifier, either ``pipe:`` or | |
481 | ``tempfile:``. If no specifier is given, ``pipe:`` is used by default. |
|
482 | ``tempfile:``. If no specifier is given, ``pipe:`` is used by default. | |
482 |
|
483 | |||
483 | A ``pipe:`` command must accept data on stdin and return the transformed |
|
484 | A ``pipe:`` command must accept data on stdin and return the transformed | |
484 | data on stdout. |
|
485 | data on stdout. | |
485 |
|
486 | |||
486 | Pipe example:: |
|
487 | Pipe example:: | |
487 |
|
488 | |||
488 | [encode] |
|
489 | [encode] | |
489 | # uncompress gzip files on checkin to improve delta compression |
|
490 | # uncompress gzip files on checkin to improve delta compression | |
490 | # note: not necessarily a good idea, just an example |
|
491 | # note: not necessarily a good idea, just an example | |
491 | *.gz = pipe: gunzip |
|
492 | *.gz = pipe: gunzip | |
492 |
|
493 | |||
493 | [decode] |
|
494 | [decode] | |
494 | # recompress gzip files when writing them to the working dir (we |
|
495 | # recompress gzip files when writing them to the working dir (we | |
495 | # can safely omit "pipe:", because it's the default) |
|
496 | # can safely omit "pipe:", because it's the default) | |
496 | *.gz = gzip |
|
497 | *.gz = gzip | |
497 |
|
498 | |||
498 | A ``tempfile:`` command is a template. The string ``INFILE`` is replaced |
|
499 | A ``tempfile:`` command is a template. The string ``INFILE`` is replaced | |
499 | with the name of a temporary file that contains the data to be |
|
500 | with the name of a temporary file that contains the data to be | |
500 | filtered by the command. The string ``OUTFILE`` is replaced with the name |
|
501 | filtered by the command. The string ``OUTFILE`` is replaced with the name | |
501 | of an empty temporary file, where the filtered data must be written by |
|
502 | of an empty temporary file, where the filtered data must be written by | |
502 | the command. |
|
503 | the command. | |
503 |
|
504 | |||
504 | .. note:: |
|
505 | .. note:: | |
505 |
|
506 | |||
506 | The tempfile mechanism is recommended for Windows systems, |
|
507 | The tempfile mechanism is recommended for Windows systems, | |
507 | where the standard shell I/O redirection operators often have |
|
508 | where the standard shell I/O redirection operators often have | |
508 | strange effects and may corrupt the contents of your files. |
|
509 | strange effects and may corrupt the contents of your files. | |
509 |
|
510 | |||
510 | This filter mechanism is used internally by the ``eol`` extension to |
|
511 | This filter mechanism is used internally by the ``eol`` extension to | |
511 | translate line ending characters between Windows (CRLF) and Unix (LF) |
|
512 | translate line ending characters between Windows (CRLF) and Unix (LF) | |
512 | format. We suggest you use the ``eol`` extension for convenience. |
|
513 | format. We suggest you use the ``eol`` extension for convenience. | |
513 |
|
514 | |||
514 |
|
515 | |||
515 | ``defaults`` |
|
516 | ``defaults`` | |
516 | ------------ |
|
517 | ------------ | |
517 |
|
518 | |||
518 | (defaults are deprecated. Don't use them. Use aliases instead) |
|
519 | (defaults are deprecated. Don't use them. Use aliases instead) | |
519 |
|
520 | |||
520 | Use the ``[defaults]`` section to define command defaults, i.e. the |
|
521 | Use the ``[defaults]`` section to define command defaults, i.e. the | |
521 | default options/arguments to pass to the specified commands. |
|
522 | default options/arguments to pass to the specified commands. | |
522 |
|
523 | |||
523 | The following example makes :hg:`log` run in verbose mode, and |
|
524 | The following example makes :hg:`log` run in verbose mode, and | |
524 | :hg:`status` show only the modified files, by default:: |
|
525 | :hg:`status` show only the modified files, by default:: | |
525 |
|
526 | |||
526 | [defaults] |
|
527 | [defaults] | |
527 | log = -v |
|
528 | log = -v | |
528 | status = -m |
|
529 | status = -m | |
529 |
|
530 | |||
530 | The actual commands, instead of their aliases, must be used when |
|
531 | The actual commands, instead of their aliases, must be used when | |
531 | defining command defaults. The command defaults will also be applied |
|
532 | defining command defaults. The command defaults will also be applied | |
532 | to the aliases of the commands defined. |
|
533 | to the aliases of the commands defined. | |
533 |
|
534 | |||
534 |
|
535 | |||
535 | ``diff`` |
|
536 | ``diff`` | |
536 | -------- |
|
537 | -------- | |
537 |
|
538 | |||
538 | Settings used when displaying diffs. Everything except for ``unified`` |
|
539 | Settings used when displaying diffs. Everything except for ``unified`` | |
539 | is a Boolean and defaults to False. See ``annotate`` section for |
|
540 | is a Boolean and defaults to False. See ``annotate`` section for | |
540 | related options for the annotate command. |
|
541 | related options for the annotate command. | |
541 |
|
542 | |||
542 | ``git`` |
|
543 | ``git`` | |
543 | Use git extended diff format. |
|
544 | Use git extended diff format. | |
544 |
|
545 | |||
545 | ``nobinary`` |
|
546 | ``nobinary`` | |
546 | Omit git binary patches. |
|
547 | Omit git binary patches. | |
547 |
|
548 | |||
548 | ``nodates`` |
|
549 | ``nodates`` | |
549 | Don't include dates in diff headers. |
|
550 | Don't include dates in diff headers. | |
550 |
|
551 | |||
551 | ``noprefix`` |
|
552 | ``noprefix`` | |
552 | Omit 'a/' and 'b/' prefixes from filenames. Ignored in plain mode. |
|
553 | Omit 'a/' and 'b/' prefixes from filenames. Ignored in plain mode. | |
553 |
|
554 | |||
554 | ``showfunc`` |
|
555 | ``showfunc`` | |
555 | Show which function each change is in. |
|
556 | Show which function each change is in. | |
556 |
|
557 | |||
557 | ``ignorews`` |
|
558 | ``ignorews`` | |
558 | Ignore white space when comparing lines. |
|
559 | Ignore white space when comparing lines. | |
559 |
|
560 | |||
560 | ``ignorewsamount`` |
|
561 | ``ignorewsamount`` | |
561 | Ignore changes in the amount of white space. |
|
562 | Ignore changes in the amount of white space. | |
562 |
|
563 | |||
563 | ``ignoreblanklines`` |
|
564 | ``ignoreblanklines`` | |
564 | Ignore changes whose lines are all blank. |
|
565 | Ignore changes whose lines are all blank. | |
565 |
|
566 | |||
566 | ``unified`` |
|
567 | ``unified`` | |
567 | Number of lines of context to show. |
|
568 | Number of lines of context to show. | |
568 |
|
569 | |||
569 | ``email`` |
|
570 | ``email`` | |
570 | --------- |
|
571 | --------- | |
571 |
|
572 | |||
572 | Settings for extensions that send email messages. |
|
573 | Settings for extensions that send email messages. | |
573 |
|
574 | |||
574 | ``from`` |
|
575 | ``from`` | |
575 | Optional. Email address to use in "From" header and SMTP envelope |
|
576 | Optional. Email address to use in "From" header and SMTP envelope | |
576 | of outgoing messages. |
|
577 | of outgoing messages. | |
577 |
|
578 | |||
578 | ``to`` |
|
579 | ``to`` | |
579 | Optional. Comma-separated list of recipients' email addresses. |
|
580 | Optional. Comma-separated list of recipients' email addresses. | |
580 |
|
581 | |||
581 | ``cc`` |
|
582 | ``cc`` | |
582 | Optional. Comma-separated list of carbon copy recipients' |
|
583 | Optional. Comma-separated list of carbon copy recipients' | |
583 | email addresses. |
|
584 | email addresses. | |
584 |
|
585 | |||
585 | ``bcc`` |
|
586 | ``bcc`` | |
586 | Optional. Comma-separated list of blind carbon copy recipients' |
|
587 | Optional. Comma-separated list of blind carbon copy recipients' | |
587 | email addresses. |
|
588 | email addresses. | |
588 |
|
589 | |||
589 | ``method`` |
|
590 | ``method`` | |
590 | Optional. Method to use to send email messages. If value is ``smtp`` |
|
591 | Optional. Method to use to send email messages. If value is ``smtp`` | |
591 | (default), use SMTP (see the ``[smtp]`` section for configuration). |
|
592 | (default), use SMTP (see the ``[smtp]`` section for configuration). | |
592 | Otherwise, use as name of program to run that acts like sendmail |
|
593 | Otherwise, use as name of program to run that acts like sendmail | |
593 | (takes ``-f`` option for sender, list of recipients on command line, |
|
594 | (takes ``-f`` option for sender, list of recipients on command line, | |
594 | message on stdin). Normally, setting this to ``sendmail`` or |
|
595 | message on stdin). Normally, setting this to ``sendmail`` or | |
595 | ``/usr/sbin/sendmail`` is enough to use sendmail to send messages. |
|
596 | ``/usr/sbin/sendmail`` is enough to use sendmail to send messages. | |
596 |
|
597 | |||
597 | ``charsets`` |
|
598 | ``charsets`` | |
598 | Optional. Comma-separated list of character sets considered |
|
599 | Optional. Comma-separated list of character sets considered | |
599 | convenient for recipients. Addresses, headers, and parts not |
|
600 | convenient for recipients. Addresses, headers, and parts not | |
600 | containing patches of outgoing messages will be encoded in the |
|
601 | containing patches of outgoing messages will be encoded in the | |
601 | first character set to which conversion from local encoding |
|
602 | first character set to which conversion from local encoding | |
602 | (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct |
|
603 | (``$HGENCODING``, ``ui.fallbackencoding``) succeeds. If correct | |
603 | conversion fails, the text in question is sent as is. Defaults to |
|
604 | conversion fails, the text in question is sent as is. Defaults to | |
604 | empty (explicit) list. |
|
605 | empty (explicit) list. | |
605 |
|
606 | |||
606 | Order of outgoing email character sets: |
|
607 | Order of outgoing email character sets: | |
607 |
|
608 | |||
608 | 1. ``us-ascii``: always first, regardless of settings |
|
609 | 1. ``us-ascii``: always first, regardless of settings | |
609 | 2. ``email.charsets``: in order given by user |
|
610 | 2. ``email.charsets``: in order given by user | |
610 | 3. ``ui.fallbackencoding``: if not in email.charsets |
|
611 | 3. ``ui.fallbackencoding``: if not in email.charsets | |
611 | 4. ``$HGENCODING``: if not in email.charsets |
|
612 | 4. ``$HGENCODING``: if not in email.charsets | |
612 | 5. ``utf-8``: always last, regardless of settings |
|
613 | 5. ``utf-8``: always last, regardless of settings | |
613 |
|
614 | |||
614 | Email example:: |
|
615 | Email example:: | |
615 |
|
616 | |||
616 | [email] |
|
617 | [email] | |
617 | from = Joseph User <joe.user@example.com> |
|
618 | from = Joseph User <joe.user@example.com> | |
618 | method = /usr/sbin/sendmail |
|
619 | method = /usr/sbin/sendmail | |
619 | # charsets for western Europeans |
|
620 | # charsets for western Europeans | |
620 | # us-ascii, utf-8 omitted, as they are tried first and last |
|
621 | # us-ascii, utf-8 omitted, as they are tried first and last | |
621 | charsets = iso-8859-1, iso-8859-15, windows-1252 |
|
622 | charsets = iso-8859-1, iso-8859-15, windows-1252 | |
622 |
|
623 | |||
623 |
|
624 | |||
624 | ``extensions`` |
|
625 | ``extensions`` | |
625 | -------------- |
|
626 | -------------- | |
626 |
|
627 | |||
627 | Mercurial has an extension mechanism for adding new features. To |
|
628 | Mercurial has an extension mechanism for adding new features. To | |
628 | enable an extension, create an entry for it in this section. |
|
629 | enable an extension, create an entry for it in this section. | |
629 |
|
630 | |||
630 | If you know that the extension is already in Python's search path, |
|
631 | If you know that the extension is already in Python's search path, | |
631 | you can give the name of the module, followed by ``=``, with nothing |
|
632 | you can give the name of the module, followed by ``=``, with nothing | |
632 | after the ``=``. |
|
633 | after the ``=``. | |
633 |
|
634 | |||
634 | Otherwise, give a name that you choose, followed by ``=``, followed by |
|
635 | Otherwise, give a name that you choose, followed by ``=``, followed by | |
635 | the path to the ``.py`` file (including the file name extension) that |
|
636 | the path to the ``.py`` file (including the file name extension) that | |
636 | defines the extension. |
|
637 | defines the extension. | |
637 |
|
638 | |||
638 | To explicitly disable an extension that is enabled in an hgrc of |
|
639 | To explicitly disable an extension that is enabled in an hgrc of | |
639 | broader scope, prepend its path with ``!``, as in ``foo = !/ext/path`` |
|
640 | broader scope, prepend its path with ``!``, as in ``foo = !/ext/path`` | |
640 | or ``foo = !`` when path is not supplied. |
|
641 | or ``foo = !`` when path is not supplied. | |
641 |
|
642 | |||
642 | Example for ``~/.hgrc``:: |
|
643 | Example for ``~/.hgrc``:: | |
643 |
|
644 | |||
644 | [extensions] |
|
645 | [extensions] | |
645 | # (the color extension will get loaded from Mercurial's path) |
|
646 | # (the color extension will get loaded from Mercurial's path) | |
646 | color = |
|
647 | color = | |
647 | # (this extension will get loaded from the file specified) |
|
648 | # (this extension will get loaded from the file specified) | |
648 | myfeature = ~/.hgext/myfeature.py |
|
649 | myfeature = ~/.hgext/myfeature.py | |
649 |
|
650 | |||
650 |
|
651 | |||
651 | ``format`` |
|
652 | ``format`` | |
652 | ---------- |
|
653 | ---------- | |
653 |
|
654 | |||
654 | ``usestore`` |
|
655 | ``usestore`` | |
655 | Enable or disable the "store" repository format which improves |
|
656 | Enable or disable the "store" repository format which improves | |
656 | compatibility with systems that fold case or otherwise mangle |
|
657 | compatibility with systems that fold case or otherwise mangle | |
657 | filenames. Enabled by default. Disabling this option will allow |
|
658 | filenames. Enabled by default. Disabling this option will allow | |
658 | you to store longer filenames in some situations at the expense of |
|
659 | you to store longer filenames in some situations at the expense of | |
659 | compatibility and ensures that the on-disk format of newly created |
|
660 | compatibility and ensures that the on-disk format of newly created | |
660 | repositories will be compatible with Mercurial before version 0.9.4. |
|
661 | repositories will be compatible with Mercurial before version 0.9.4. | |
661 |
|
662 | |||
662 | ``usefncache`` |
|
663 | ``usefncache`` | |
663 | Enable or disable the "fncache" repository format which enhances |
|
664 | Enable or disable the "fncache" repository format which enhances | |
664 | the "store" repository format (which has to be enabled to use |
|
665 | the "store" repository format (which has to be enabled to use | |
665 | fncache) to allow longer filenames and avoids using Windows |
|
666 | fncache) to allow longer filenames and avoids using Windows | |
666 | reserved names, e.g. "nul". Enabled by default. Disabling this |
|
667 | reserved names, e.g. "nul". Enabled by default. Disabling this | |
667 | option ensures that the on-disk format of newly created |
|
668 | option ensures that the on-disk format of newly created | |
668 | repositories will be compatible with Mercurial before version 1.1. |
|
669 | repositories will be compatible with Mercurial before version 1.1. | |
669 |
|
670 | |||
670 | ``dotencode`` |
|
671 | ``dotencode`` | |
671 | Enable or disable the "dotencode" repository format which enhances |
|
672 | Enable or disable the "dotencode" repository format which enhances | |
672 | the "fncache" repository format (which has to be enabled to use |
|
673 | the "fncache" repository format (which has to be enabled to use | |
673 | dotencode) to avoid issues with filenames starting with ._ on |
|
674 | dotencode) to avoid issues with filenames starting with ._ on | |
674 | Mac OS X and spaces on Windows. Enabled by default. Disabling this |
|
675 | Mac OS X and spaces on Windows. Enabled by default. Disabling this | |
675 | option ensures that the on-disk format of newly created |
|
676 | option ensures that the on-disk format of newly created | |
676 | repositories will be compatible with Mercurial before version 1.7. |
|
677 | repositories will be compatible with Mercurial before version 1.7. | |
677 |
|
678 | |||
678 | ``graph`` |
|
679 | ``graph`` | |
679 | --------- |
|
680 | --------- | |
680 |
|
681 | |||
681 | Web graph view configuration. This section let you change graph |
|
682 | Web graph view configuration. This section let you change graph | |
682 | elements display properties by branches, for instance to make the |
|
683 | elements display properties by branches, for instance to make the | |
683 | ``default`` branch stand out. |
|
684 | ``default`` branch stand out. | |
684 |
|
685 | |||
685 | Each line has the following format:: |
|
686 | Each line has the following format:: | |
686 |
|
687 | |||
687 | <branch>.<argument> = <value> |
|
688 | <branch>.<argument> = <value> | |
688 |
|
689 | |||
689 | where ``<branch>`` is the name of the branch being |
|
690 | where ``<branch>`` is the name of the branch being | |
690 | customized. Example:: |
|
691 | customized. Example:: | |
691 |
|
692 | |||
692 | [graph] |
|
693 | [graph] | |
693 | # 2px width |
|
694 | # 2px width | |
694 | default.width = 2 |
|
695 | default.width = 2 | |
695 | # red color |
|
696 | # red color | |
696 | default.color = FF0000 |
|
697 | default.color = FF0000 | |
697 |
|
698 | |||
698 | Supported arguments: |
|
699 | Supported arguments: | |
699 |
|
700 | |||
700 | ``width`` |
|
701 | ``width`` | |
701 | Set branch edges width in pixels. |
|
702 | Set branch edges width in pixels. | |
702 |
|
703 | |||
703 | ``color`` |
|
704 | ``color`` | |
704 | Set branch edges color in hexadecimal RGB notation. |
|
705 | Set branch edges color in hexadecimal RGB notation. | |
705 |
|
706 | |||
706 | ``hooks`` |
|
707 | ``hooks`` | |
707 | --------- |
|
708 | --------- | |
708 |
|
709 | |||
709 | Commands or Python functions that get automatically executed by |
|
710 | Commands or Python functions that get automatically executed by | |
710 | various actions such as starting or finishing a commit. Multiple |
|
711 | various actions such as starting or finishing a commit. Multiple | |
711 | hooks can be run for the same action by appending a suffix to the |
|
712 | hooks can be run for the same action by appending a suffix to the | |
712 | action. Overriding a site-wide hook can be done by changing its |
|
713 | action. Overriding a site-wide hook can be done by changing its | |
713 | value or setting it to an empty string. Hooks can be prioritized |
|
714 | value or setting it to an empty string. Hooks can be prioritized | |
714 | by adding a prefix of ``priority`` to the hook name on a new line |
|
715 | by adding a prefix of ``priority`` to the hook name on a new line | |
715 | and setting the priority. The default priority is 0 if |
|
716 | and setting the priority. The default priority is 0 if | |
716 | not specified. |
|
717 | not specified. | |
717 |
|
718 | |||
718 | Example ``.hg/hgrc``:: |
|
719 | Example ``.hg/hgrc``:: | |
719 |
|
720 | |||
720 | [hooks] |
|
721 | [hooks] | |
721 | # update working directory after adding changesets |
|
722 | # update working directory after adding changesets | |
722 | changegroup.update = hg update |
|
723 | changegroup.update = hg update | |
723 | # do not use the site-wide hook |
|
724 | # do not use the site-wide hook | |
724 | incoming = |
|
725 | incoming = | |
725 | incoming.email = /my/email/hook |
|
726 | incoming.email = /my/email/hook | |
726 | incoming.autobuild = /my/build/hook |
|
727 | incoming.autobuild = /my/build/hook | |
727 | # force autobuild hook to run before other incoming hooks |
|
728 | # force autobuild hook to run before other incoming hooks | |
728 | priority.incoming.autobuild = 1 |
|
729 | priority.incoming.autobuild = 1 | |
729 |
|
730 | |||
730 | Most hooks are run with environment variables set that give useful |
|
731 | Most hooks are run with environment variables set that give useful | |
731 | additional information. For each hook below, the environment |
|
732 | additional information. For each hook below, the environment | |
732 | variables it is passed are listed with names of the form ``$HG_foo``. |
|
733 | variables it is passed are listed with names of the form ``$HG_foo``. | |
733 |
|
734 | |||
734 | ``changegroup`` |
|
735 | ``changegroup`` | |
735 | Run after a changegroup has been added via push, pull or unbundle. |
|
736 | Run after a changegroup has been added via push, pull or unbundle. | |
736 | ID of the first new changeset is in ``$HG_NODE``. URL from which |
|
737 | ID of the first new changeset is in ``$HG_NODE``. URL from which | |
737 | changes came is in ``$HG_URL``. |
|
738 | changes came is in ``$HG_URL``. | |
738 |
|
739 | |||
739 | ``commit`` |
|
740 | ``commit`` | |
740 | Run after a changeset has been created in the local repository. ID |
|
741 | Run after a changeset has been created in the local repository. ID | |
741 | of the newly created changeset is in ``$HG_NODE``. Parent changeset |
|
742 | of the newly created changeset is in ``$HG_NODE``. Parent changeset | |
742 | IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. |
|
743 | IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. | |
743 |
|
744 | |||
744 | ``incoming`` |
|
745 | ``incoming`` | |
745 | Run after a changeset has been pulled, pushed, or unbundled into |
|
746 | Run after a changeset has been pulled, pushed, or unbundled into | |
746 | the local repository. The ID of the newly arrived changeset is in |
|
747 | the local repository. The ID of the newly arrived changeset is in | |
747 | ``$HG_NODE``. URL that was source of changes came is in ``$HG_URL``. |
|
748 | ``$HG_NODE``. URL that was source of changes came is in ``$HG_URL``. | |
748 |
|
749 | |||
749 | ``outgoing`` |
|
750 | ``outgoing`` | |
750 | Run after sending changes from local repository to another. ID of |
|
751 | Run after sending changes from local repository to another. ID of | |
751 | first changeset sent is in ``$HG_NODE``. Source of operation is in |
|
752 | first changeset sent is in ``$HG_NODE``. Source of operation is in | |
752 | ``$HG_SOURCE``; see "preoutgoing" hook for description. |
|
753 | ``$HG_SOURCE``; see "preoutgoing" hook for description. | |
753 |
|
754 | |||
754 | ``post-<command>`` |
|
755 | ``post-<command>`` | |
755 | Run after successful invocations of the associated command. The |
|
756 | Run after successful invocations of the associated command. The | |
756 | contents of the command line are passed as ``$HG_ARGS`` and the result |
|
757 | contents of the command line are passed as ``$HG_ARGS`` and the result | |
757 | code in ``$HG_RESULT``. Parsed command line arguments are passed as |
|
758 | code in ``$HG_RESULT``. Parsed command line arguments are passed as | |
758 | ``$HG_PATS`` and ``$HG_OPTS``. These contain string representations of |
|
759 | ``$HG_PATS`` and ``$HG_OPTS``. These contain string representations of | |
759 | the python data internally passed to <command>. ``$HG_OPTS`` is a |
|
760 | the python data internally passed to <command>. ``$HG_OPTS`` is a | |
760 | dictionary of options (with unspecified options set to their defaults). |
|
761 | dictionary of options (with unspecified options set to their defaults). | |
761 | ``$HG_PATS`` is a list of arguments. Hook failure is ignored. |
|
762 | ``$HG_PATS`` is a list of arguments. Hook failure is ignored. | |
762 |
|
763 | |||
763 | ``pre-<command>`` |
|
764 | ``pre-<command>`` | |
764 | Run before executing the associated command. The contents of the |
|
765 | Run before executing the associated command. The contents of the | |
765 | command line are passed as ``$HG_ARGS``. Parsed command line arguments |
|
766 | command line are passed as ``$HG_ARGS``. Parsed command line arguments | |
766 | are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain string |
|
767 | are passed as ``$HG_PATS`` and ``$HG_OPTS``. These contain string | |
767 | representations of the data internally passed to <command>. ``$HG_OPTS`` |
|
768 | representations of the data internally passed to <command>. ``$HG_OPTS`` | |
768 | is a dictionary of options (with unspecified options set to their |
|
769 | is a dictionary of options (with unspecified options set to their | |
769 | defaults). ``$HG_PATS`` is a list of arguments. If the hook returns |
|
770 | defaults). ``$HG_PATS`` is a list of arguments. If the hook returns | |
770 | failure, the command doesn't execute and Mercurial returns the failure |
|
771 | failure, the command doesn't execute and Mercurial returns the failure | |
771 | code. |
|
772 | code. | |
772 |
|
773 | |||
773 | ``prechangegroup`` |
|
774 | ``prechangegroup`` | |
774 | Run before a changegroup is added via push, pull or unbundle. Exit |
|
775 | Run before a changegroup is added via push, pull or unbundle. Exit | |
775 | status 0 allows the changegroup to proceed. Non-zero status will |
|
776 | status 0 allows the changegroup to proceed. Non-zero status will | |
776 | cause the push, pull or unbundle to fail. URL from which changes |
|
777 | cause the push, pull or unbundle to fail. URL from which changes | |
777 | will come is in ``$HG_URL``. |
|
778 | will come is in ``$HG_URL``. | |
778 |
|
779 | |||
779 | ``precommit`` |
|
780 | ``precommit`` | |
780 | Run before starting a local commit. Exit status 0 allows the |
|
781 | Run before starting a local commit. Exit status 0 allows the | |
781 | commit to proceed. Non-zero status will cause the commit to fail. |
|
782 | commit to proceed. Non-zero status will cause the commit to fail. | |
782 | Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. |
|
783 | Parent changeset IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. | |
783 |
|
784 | |||
784 | ``prelistkeys`` |
|
785 | ``prelistkeys`` | |
785 | Run before listing pushkeys (like bookmarks) in the |
|
786 | Run before listing pushkeys (like bookmarks) in the | |
786 | repository. Non-zero status will cause failure. The key namespace is |
|
787 | repository. Non-zero status will cause failure. The key namespace is | |
787 | in ``$HG_NAMESPACE``. |
|
788 | in ``$HG_NAMESPACE``. | |
788 |
|
789 | |||
789 | ``preoutgoing`` |
|
790 | ``preoutgoing`` | |
790 | Run before collecting changes to send from the local repository to |
|
791 | Run before collecting changes to send from the local repository to | |
791 | another. Non-zero status will cause failure. This lets you prevent |
|
792 | another. Non-zero status will cause failure. This lets you prevent | |
792 | pull over HTTP or SSH. Also prevents against local pull, push |
|
793 | pull over HTTP or SSH. Also prevents against local pull, push | |
793 | (outbound) or bundle commands, but not effective, since you can |
|
794 | (outbound) or bundle commands, but not effective, since you can | |
794 | just copy files instead then. Source of operation is in |
|
795 | just copy files instead then. Source of operation is in | |
795 | ``$HG_SOURCE``. If "serve", operation is happening on behalf of remote |
|
796 | ``$HG_SOURCE``. If "serve", operation is happening on behalf of remote | |
796 | SSH or HTTP repository. If "push", "pull" or "bundle", operation |
|
797 | SSH or HTTP repository. If "push", "pull" or "bundle", operation | |
797 | is happening on behalf of repository on same system. |
|
798 | is happening on behalf of repository on same system. | |
798 |
|
799 | |||
799 | ``prepushkey`` |
|
800 | ``prepushkey`` | |
800 | Run before a pushkey (like a bookmark) is added to the |
|
801 | Run before a pushkey (like a bookmark) is added to the | |
801 | repository. Non-zero status will cause the key to be rejected. The |
|
802 | repository. Non-zero status will cause the key to be rejected. The | |
802 | key namespace is in ``$HG_NAMESPACE``, the key is in ``$HG_KEY``, |
|
803 | key namespace is in ``$HG_NAMESPACE``, the key is in ``$HG_KEY``, | |
803 | the old value (if any) is in ``$HG_OLD``, and the new value is in |
|
804 | the old value (if any) is in ``$HG_OLD``, and the new value is in | |
804 | ``$HG_NEW``. |
|
805 | ``$HG_NEW``. | |
805 |
|
806 | |||
806 | ``pretag`` |
|
807 | ``pretag`` | |
807 | Run before creating a tag. Exit status 0 allows the tag to be |
|
808 | Run before creating a tag. Exit status 0 allows the tag to be | |
808 | created. Non-zero status will cause the tag to fail. ID of |
|
809 | created. Non-zero status will cause the tag to fail. ID of | |
809 | changeset to tag is in ``$HG_NODE``. Name of tag is in ``$HG_TAG``. Tag is |
|
810 | changeset to tag is in ``$HG_NODE``. Name of tag is in ``$HG_TAG``. Tag is | |
810 | local if ``$HG_LOCAL=1``, in repository if ``$HG_LOCAL=0``. |
|
811 | local if ``$HG_LOCAL=1``, in repository if ``$HG_LOCAL=0``. | |
811 |
|
812 | |||
812 | ``pretxnopen`` |
|
813 | ``pretxnopen`` | |
813 | Run before any new repository transaction is open. The reason for the |
|
814 | Run before any new repository transaction is open. The reason for the | |
814 | transaction will be in ``$HG_TXNNAME`` and a unique identifier for the |
|
815 | transaction will be in ``$HG_TXNNAME`` and a unique identifier for the | |
815 | transaction will be in ``HG_TXNID``. A non-zero status will prevent the |
|
816 | transaction will be in ``HG_TXNID``. A non-zero status will prevent the | |
816 | transaction from being opened. |
|
817 | transaction from being opened. | |
817 |
|
818 | |||
818 | ``pretxnclose`` |
|
819 | ``pretxnclose`` | |
819 | Run right before the transaction is actually finalized. Any |
|
820 | Run right before the transaction is actually finalized. Any | |
820 | repository change will be visible to the hook program. This lets you |
|
821 | repository change will be visible to the hook program. This lets you | |
821 | validate the transaction content or change it. Exit status 0 allows |
|
822 | validate the transaction content or change it. Exit status 0 allows | |
822 | the commit to proceed. Non-zero status will cause the transaction to |
|
823 | the commit to proceed. Non-zero status will cause the transaction to | |
823 | be rolled back. The reason for the transaction opening will be in |
|
824 | be rolled back. The reason for the transaction opening will be in | |
824 | ``$HG_TXNNAME`` and a unique identifier for the transaction will be in |
|
825 | ``$HG_TXNNAME`` and a unique identifier for the transaction will be in | |
825 | ``HG_TXNID``. The rest of the available data will vary according the |
|
826 | ``HG_TXNID``. The rest of the available data will vary according the | |
826 | transaction type. New changesets will add ``$HG_NODE`` (id of the |
|
827 | transaction type. New changesets will add ``$HG_NODE`` (id of the | |
827 | first added changeset), ``$HG_URL`` and ``$HG_SOURCE`` variables, |
|
828 | first added changeset), ``$HG_URL`` and ``$HG_SOURCE`` variables, | |
828 | bookmarks and phases changes will set ``HG_BOOKMARK_MOVED`` and |
|
829 | bookmarks and phases changes will set ``HG_BOOKMARK_MOVED`` and | |
829 | ``HG_PHASES_MOVED`` to ``1``, etc. |
|
830 | ``HG_PHASES_MOVED`` to ``1``, etc. | |
830 |
|
831 | |||
831 | ``txnclose`` |
|
832 | ``txnclose`` | |
832 | Run after any repository transaction has been committed. At this |
|
833 | Run after any repository transaction has been committed. At this | |
833 | point, the transaction can no longer be rolled back. The hook will run |
|
834 | point, the transaction can no longer be rolled back. The hook will run | |
834 | after the lock is released. See ``pretxnclose`` docs for details about |
|
835 | after the lock is released. See ``pretxnclose`` docs for details about | |
835 | available variables. |
|
836 | available variables. | |
836 |
|
837 | |||
837 | ``txnabort`` |
|
838 | ``txnabort`` | |
838 | Run when a transaction is aborted. See ``pretxnclose`` docs for details about |
|
839 | Run when a transaction is aborted. See ``pretxnclose`` docs for details about | |
839 | available variables. |
|
840 | available variables. | |
840 |
|
841 | |||
841 | ``pretxnchangegroup`` |
|
842 | ``pretxnchangegroup`` | |
842 | Run after a changegroup has been added via push, pull or unbundle, |
|
843 | Run after a changegroup has been added via push, pull or unbundle, | |
843 | but before the transaction has been committed. Changegroup is |
|
844 | but before the transaction has been committed. Changegroup is | |
844 | visible to hook program. This lets you validate incoming changes |
|
845 | visible to hook program. This lets you validate incoming changes | |
845 | before accepting them. Passed the ID of the first new changeset in |
|
846 | before accepting them. Passed the ID of the first new changeset in | |
846 | ``$HG_NODE``. Exit status 0 allows the transaction to commit. Non-zero |
|
847 | ``$HG_NODE``. Exit status 0 allows the transaction to commit. Non-zero | |
847 | status will cause the transaction to be rolled back and the push, |
|
848 | status will cause the transaction to be rolled back and the push, | |
848 | pull or unbundle will fail. URL that was source of changes is in |
|
849 | pull or unbundle will fail. URL that was source of changes is in | |
849 | ``$HG_URL``. |
|
850 | ``$HG_URL``. | |
850 |
|
851 | |||
851 | ``pretxncommit`` |
|
852 | ``pretxncommit`` | |
852 | Run after a changeset has been created but the transaction not yet |
|
853 | Run after a changeset has been created but the transaction not yet | |
853 | committed. Changeset is visible to hook program. This lets you |
|
854 | committed. Changeset is visible to hook program. This lets you | |
854 | validate commit message and changes. Exit status 0 allows the |
|
855 | validate commit message and changes. Exit status 0 allows the | |
855 | commit to proceed. Non-zero status will cause the transaction to |
|
856 | commit to proceed. Non-zero status will cause the transaction to | |
856 | be rolled back. ID of changeset is in ``$HG_NODE``. Parent changeset |
|
857 | be rolled back. ID of changeset is in ``$HG_NODE``. Parent changeset | |
857 | IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. |
|
858 | IDs are in ``$HG_PARENT1`` and ``$HG_PARENT2``. | |
858 |
|
859 | |||
859 | ``preupdate`` |
|
860 | ``preupdate`` | |
860 | Run before updating the working directory. Exit status 0 allows |
|
861 | Run before updating the working directory. Exit status 0 allows | |
861 | the update to proceed. Non-zero status will prevent the update. |
|
862 | the update to proceed. Non-zero status will prevent the update. | |
862 | Changeset ID of first new parent is in ``$HG_PARENT1``. If merge, ID |
|
863 | Changeset ID of first new parent is in ``$HG_PARENT1``. If merge, ID | |
863 | of second new parent is in ``$HG_PARENT2``. |
|
864 | of second new parent is in ``$HG_PARENT2``. | |
864 |
|
865 | |||
865 | ``listkeys`` |
|
866 | ``listkeys`` | |
866 | Run after listing pushkeys (like bookmarks) in the repository. The |
|
867 | Run after listing pushkeys (like bookmarks) in the repository. The | |
867 | key namespace is in ``$HG_NAMESPACE``. ``$HG_VALUES`` is a |
|
868 | key namespace is in ``$HG_NAMESPACE``. ``$HG_VALUES`` is a | |
868 | dictionary containing the keys and values. |
|
869 | dictionary containing the keys and values. | |
869 |
|
870 | |||
870 | ``pushkey`` |
|
871 | ``pushkey`` | |
871 | Run after a pushkey (like a bookmark) is added to the |
|
872 | Run after a pushkey (like a bookmark) is added to the | |
872 | repository. The key namespace is in ``$HG_NAMESPACE``, the key is in |
|
873 | repository. The key namespace is in ``$HG_NAMESPACE``, the key is in | |
873 | ``$HG_KEY``, the old value (if any) is in ``$HG_OLD``, and the new |
|
874 | ``$HG_KEY``, the old value (if any) is in ``$HG_OLD``, and the new | |
874 | value is in ``$HG_NEW``. |
|
875 | value is in ``$HG_NEW``. | |
875 |
|
876 | |||
876 | ``tag`` |
|
877 | ``tag`` | |
877 | Run after a tag is created. ID of tagged changeset is in ``$HG_NODE``. |
|
878 | Run after a tag is created. ID of tagged changeset is in ``$HG_NODE``. | |
878 | Name of tag is in ``$HG_TAG``. Tag is local if ``$HG_LOCAL=1``, in |
|
879 | Name of tag is in ``$HG_TAG``. Tag is local if ``$HG_LOCAL=1``, in | |
879 | repository if ``$HG_LOCAL=0``. |
|
880 | repository if ``$HG_LOCAL=0``. | |
880 |
|
881 | |||
881 | ``update`` |
|
882 | ``update`` | |
882 | Run after updating the working directory. Changeset ID of first |
|
883 | Run after updating the working directory. Changeset ID of first | |
883 | new parent is in ``$HG_PARENT1``. If merge, ID of second new parent is |
|
884 | new parent is in ``$HG_PARENT1``. If merge, ID of second new parent is | |
884 | in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the |
|
885 | in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the | |
885 | update failed (e.g. because conflicts not resolved), ``$HG_ERROR=1``. |
|
886 | update failed (e.g. because conflicts not resolved), ``$HG_ERROR=1``. | |
886 |
|
887 | |||
887 | .. note:: |
|
888 | .. note:: | |
888 |
|
889 | |||
889 | It is generally better to use standard hooks rather than the |
|
890 | It is generally better to use standard hooks rather than the | |
890 | generic pre- and post- command hooks as they are guaranteed to be |
|
891 | generic pre- and post- command hooks as they are guaranteed to be | |
891 | called in the appropriate contexts for influencing transactions. |
|
892 | called in the appropriate contexts for influencing transactions. | |
892 | Also, hooks like "commit" will be called in all contexts that |
|
893 | Also, hooks like "commit" will be called in all contexts that | |
893 | generate a commit (e.g. tag) and not just the commit command. |
|
894 | generate a commit (e.g. tag) and not just the commit command. | |
894 |
|
895 | |||
895 | .. note:: |
|
896 | .. note:: | |
896 |
|
897 | |||
897 | Environment variables with empty values may not be passed to |
|
898 | Environment variables with empty values may not be passed to | |
898 | hooks on platforms such as Windows. As an example, ``$HG_PARENT2`` |
|
899 | hooks on platforms such as Windows. As an example, ``$HG_PARENT2`` | |
899 | will have an empty value under Unix-like platforms for non-merge |
|
900 | will have an empty value under Unix-like platforms for non-merge | |
900 | changesets, while it will not be available at all under Windows. |
|
901 | changesets, while it will not be available at all under Windows. | |
901 |
|
902 | |||
902 | The syntax for Python hooks is as follows:: |
|
903 | The syntax for Python hooks is as follows:: | |
903 |
|
904 | |||
904 | hookname = python:modulename.submodule.callable |
|
905 | hookname = python:modulename.submodule.callable | |
905 | hookname = python:/path/to/python/module.py:callable |
|
906 | hookname = python:/path/to/python/module.py:callable | |
906 |
|
907 | |||
907 | Python hooks are run within the Mercurial process. Each hook is |
|
908 | Python hooks are run within the Mercurial process. Each hook is | |
908 | called with at least three keyword arguments: a ui object (keyword |
|
909 | called with at least three keyword arguments: a ui object (keyword | |
909 | ``ui``), a repository object (keyword ``repo``), and a ``hooktype`` |
|
910 | ``ui``), a repository object (keyword ``repo``), and a ``hooktype`` | |
910 | keyword that tells what kind of hook is used. Arguments listed as |
|
911 | keyword that tells what kind of hook is used. Arguments listed as | |
911 | environment variables above are passed as keyword arguments, with no |
|
912 | environment variables above are passed as keyword arguments, with no | |
912 | ``HG_`` prefix, and names in lower case. |
|
913 | ``HG_`` prefix, and names in lower case. | |
913 |
|
914 | |||
914 | If a Python hook returns a "true" value or raises an exception, this |
|
915 | If a Python hook returns a "true" value or raises an exception, this | |
915 | is treated as a failure. |
|
916 | is treated as a failure. | |
916 |
|
917 | |||
917 |
|
918 | |||
918 | ``hostfingerprints`` |
|
919 | ``hostfingerprints`` | |
919 | -------------------- |
|
920 | -------------------- | |
920 |
|
921 | |||
921 | Fingerprints of the certificates of known HTTPS servers. |
|
922 | Fingerprints of the certificates of known HTTPS servers. | |
922 | A HTTPS connection to a server with a fingerprint configured here will |
|
923 | A HTTPS connection to a server with a fingerprint configured here will | |
923 | only succeed if the servers certificate matches the fingerprint. |
|
924 | only succeed if the servers certificate matches the fingerprint. | |
924 | This is very similar to how ssh known hosts works. |
|
925 | This is very similar to how ssh known hosts works. | |
925 | The fingerprint is the SHA-1 hash value of the DER encoded certificate. |
|
926 | The fingerprint is the SHA-1 hash value of the DER encoded certificate. | |
926 | The CA chain and web.cacerts is not used for servers with a fingerprint. |
|
927 | The CA chain and web.cacerts is not used for servers with a fingerprint. | |
927 |
|
928 | |||
928 | For example:: |
|
929 | For example:: | |
929 |
|
930 | |||
930 | [hostfingerprints] |
|
931 | [hostfingerprints] | |
931 | hg.intevation.org = fa:1f:d9:48:f1:e7:74:30:38:8d:d8:58:b6:94:b8:58:28:7d:8b:d0 |
|
932 | hg.intevation.org = fa:1f:d9:48:f1:e7:74:30:38:8d:d8:58:b6:94:b8:58:28:7d:8b:d0 | |
932 |
|
933 | |||
933 | This feature is only supported when using Python 2.6 or later. |
|
934 | This feature is only supported when using Python 2.6 or later. | |
934 |
|
935 | |||
935 |
|
936 | |||
936 | ``http_proxy`` |
|
937 | ``http_proxy`` | |
937 | -------------- |
|
938 | -------------- | |
938 |
|
939 | |||
939 | Used to access web-based Mercurial repositories through a HTTP |
|
940 | Used to access web-based Mercurial repositories through a HTTP | |
940 | proxy. |
|
941 | proxy. | |
941 |
|
942 | |||
942 | ``host`` |
|
943 | ``host`` | |
943 | Host name and (optional) port of the proxy server, for example |
|
944 | Host name and (optional) port of the proxy server, for example | |
944 | "myproxy:8000". |
|
945 | "myproxy:8000". | |
945 |
|
946 | |||
946 | ``no`` |
|
947 | ``no`` | |
947 | Optional. Comma-separated list of host names that should bypass |
|
948 | Optional. Comma-separated list of host names that should bypass | |
948 | the proxy. |
|
949 | the proxy. | |
949 |
|
950 | |||
950 | ``passwd`` |
|
951 | ``passwd`` | |
951 | Optional. Password to authenticate with at the proxy server. |
|
952 | Optional. Password to authenticate with at the proxy server. | |
952 |
|
953 | |||
953 | ``user`` |
|
954 | ``user`` | |
954 | Optional. User name to authenticate with at the proxy server. |
|
955 | Optional. User name to authenticate with at the proxy server. | |
955 |
|
956 | |||
956 | ``always`` |
|
957 | ``always`` | |
957 | Optional. Always use the proxy, even for localhost and any entries |
|
958 | Optional. Always use the proxy, even for localhost and any entries | |
958 | in ``http_proxy.no``. True or False. Default: False. |
|
959 | in ``http_proxy.no``. True or False. Default: False. | |
959 |
|
960 | |||
960 | ``merge-patterns`` |
|
961 | ``merge-patterns`` | |
961 | ------------------ |
|
962 | ------------------ | |
962 |
|
963 | |||
963 | This section specifies merge tools to associate with particular file |
|
964 | This section specifies merge tools to associate with particular file | |
964 | patterns. Tools matched here will take precedence over the default |
|
965 | patterns. Tools matched here will take precedence over the default | |
965 | merge tool. Patterns are globs by default, rooted at the repository |
|
966 | merge tool. Patterns are globs by default, rooted at the repository | |
966 | root. |
|
967 | root. | |
967 |
|
968 | |||
968 | Example:: |
|
969 | Example:: | |
969 |
|
970 | |||
970 | [merge-patterns] |
|
971 | [merge-patterns] | |
971 | **.c = kdiff3 |
|
972 | **.c = kdiff3 | |
972 | **.jpg = myimgmerge |
|
973 | **.jpg = myimgmerge | |
973 |
|
974 | |||
974 | ``merge-tools`` |
|
975 | ``merge-tools`` | |
975 | --------------- |
|
976 | --------------- | |
976 |
|
977 | |||
977 | This section configures external merge tools to use for file-level |
|
978 | This section configures external merge tools to use for file-level | |
978 | merges. This section has likely been preconfigured at install time. |
|
979 | merges. This section has likely been preconfigured at install time. | |
979 | Use :hg:`config merge-tools` to check the existing configuration. |
|
980 | Use :hg:`config merge-tools` to check the existing configuration. | |
980 | Also see :hg:`help merge-tools` for more details. |
|
981 | Also see :hg:`help merge-tools` for more details. | |
981 |
|
982 | |||
982 | Example ``~/.hgrc``:: |
|
983 | Example ``~/.hgrc``:: | |
983 |
|
984 | |||
984 | [merge-tools] |
|
985 | [merge-tools] | |
985 | # Override stock tool location |
|
986 | # Override stock tool location | |
986 | kdiff3.executable = ~/bin/kdiff3 |
|
987 | kdiff3.executable = ~/bin/kdiff3 | |
987 | # Specify command line |
|
988 | # Specify command line | |
988 | kdiff3.args = $base $local $other -o $output |
|
989 | kdiff3.args = $base $local $other -o $output | |
989 | # Give higher priority |
|
990 | # Give higher priority | |
990 | kdiff3.priority = 1 |
|
991 | kdiff3.priority = 1 | |
991 |
|
992 | |||
992 | # Changing the priority of preconfigured tool |
|
993 | # Changing the priority of preconfigured tool | |
993 | vimdiff.priority = 0 |
|
994 | vimdiff.priority = 0 | |
994 |
|
995 | |||
995 | # Define new tool |
|
996 | # Define new tool | |
996 | myHtmlTool.args = -m $local $other $base $output |
|
997 | myHtmlTool.args = -m $local $other $base $output | |
997 | myHtmlTool.regkey = Software\FooSoftware\HtmlMerge |
|
998 | myHtmlTool.regkey = Software\FooSoftware\HtmlMerge | |
998 | myHtmlTool.priority = 1 |
|
999 | myHtmlTool.priority = 1 | |
999 |
|
1000 | |||
1000 | Supported arguments: |
|
1001 | Supported arguments: | |
1001 |
|
1002 | |||
1002 | ``priority`` |
|
1003 | ``priority`` | |
1003 | The priority in which to evaluate this tool. |
|
1004 | The priority in which to evaluate this tool. | |
1004 | Default: 0. |
|
1005 | Default: 0. | |
1005 |
|
1006 | |||
1006 | ``executable`` |
|
1007 | ``executable`` | |
1007 | Either just the name of the executable or its pathname. On Windows, |
|
1008 | Either just the name of the executable or its pathname. On Windows, | |
1008 | the path can use environment variables with ${ProgramFiles} syntax. |
|
1009 | the path can use environment variables with ${ProgramFiles} syntax. | |
1009 | Default: the tool name. |
|
1010 | Default: the tool name. | |
1010 |
|
1011 | |||
1011 | ``args`` |
|
1012 | ``args`` | |
1012 | The arguments to pass to the tool executable. You can refer to the |
|
1013 | The arguments to pass to the tool executable. You can refer to the | |
1013 | files being merged as well as the output file through these |
|
1014 | files being merged as well as the output file through these | |
1014 | variables: ``$base``, ``$local``, ``$other``, ``$output``. The meaning |
|
1015 | variables: ``$base``, ``$local``, ``$other``, ``$output``. The meaning | |
1015 | of ``$local`` and ``$other`` can vary depending on which action is being |
|
1016 | of ``$local`` and ``$other`` can vary depending on which action is being | |
1016 | performed. During and update or merge, ``$local`` represents the original |
|
1017 | performed. During and update or merge, ``$local`` represents the original | |
1017 | state of the file, while ``$other`` represents the commit you are updating |
|
1018 | state of the file, while ``$other`` represents the commit you are updating | |
1018 | to or the commit you are merging with. During a rebase ``$local`` |
|
1019 | to or the commit you are merging with. During a rebase ``$local`` | |
1019 | represents the destination of the rebase, and ``$other`` represents the |
|
1020 | represents the destination of the rebase, and ``$other`` represents the | |
1020 | commit being rebased. |
|
1021 | commit being rebased. | |
1021 | Default: ``$local $base $other`` |
|
1022 | Default: ``$local $base $other`` | |
1022 |
|
1023 | |||
1023 | ``premerge`` |
|
1024 | ``premerge`` | |
1024 | Attempt to run internal non-interactive 3-way merge tool before |
|
1025 | Attempt to run internal non-interactive 3-way merge tool before | |
1025 | launching external tool. Options are ``true``, ``false``, ``keep`` or |
|
1026 | launching external tool. Options are ``true``, ``false``, ``keep`` or | |
1026 | ``keep-merge3``. The ``keep`` option will leave markers in the file if the |
|
1027 | ``keep-merge3``. The ``keep`` option will leave markers in the file if the | |
1027 | premerge fails. The ``keep-merge3`` will do the same but include information |
|
1028 | premerge fails. The ``keep-merge3`` will do the same but include information | |
1028 | about the base of the merge in the marker (see internal :merge3 in |
|
1029 | about the base of the merge in the marker (see internal :merge3 in | |
1029 | :hg:`help merge-tools`). |
|
1030 | :hg:`help merge-tools`). | |
1030 | Default: True |
|
1031 | Default: True | |
1031 |
|
1032 | |||
1032 | ``binary`` |
|
1033 | ``binary`` | |
1033 | This tool can merge binary files. Defaults to False, unless tool |
|
1034 | This tool can merge binary files. Defaults to False, unless tool | |
1034 | was selected by file pattern match. |
|
1035 | was selected by file pattern match. | |
1035 |
|
1036 | |||
1036 | ``symlink`` |
|
1037 | ``symlink`` | |
1037 | This tool can merge symlinks. Defaults to False, even if tool was |
|
1038 | This tool can merge symlinks. Defaults to False, even if tool was | |
1038 | selected by file pattern match. |
|
1039 | selected by file pattern match. | |
1039 |
|
1040 | |||
1040 | ``check`` |
|
1041 | ``check`` | |
1041 | A list of merge success-checking options: |
|
1042 | A list of merge success-checking options: | |
1042 |
|
1043 | |||
1043 | ``changed`` |
|
1044 | ``changed`` | |
1044 | Ask whether merge was successful when the merged file shows no changes. |
|
1045 | Ask whether merge was successful when the merged file shows no changes. | |
1045 | ``conflicts`` |
|
1046 | ``conflicts`` | |
1046 | Check whether there are conflicts even though the tool reported success. |
|
1047 | Check whether there are conflicts even though the tool reported success. | |
1047 | ``prompt`` |
|
1048 | ``prompt`` | |
1048 | Always prompt for merge success, regardless of success reported by tool. |
|
1049 | Always prompt for merge success, regardless of success reported by tool. | |
1049 |
|
1050 | |||
1050 | ``fixeol`` |
|
1051 | ``fixeol`` | |
1051 | Attempt to fix up EOL changes caused by the merge tool. |
|
1052 | Attempt to fix up EOL changes caused by the merge tool. | |
1052 | Default: False |
|
1053 | Default: False | |
1053 |
|
1054 | |||
1054 | ``gui`` |
|
1055 | ``gui`` | |
1055 | This tool requires a graphical interface to run. Default: False |
|
1056 | This tool requires a graphical interface to run. Default: False | |
1056 |
|
1057 | |||
1057 | ``regkey`` |
|
1058 | ``regkey`` | |
1058 | Windows registry key which describes install location of this |
|
1059 | Windows registry key which describes install location of this | |
1059 | tool. Mercurial will search for this key first under |
|
1060 | tool. Mercurial will search for this key first under | |
1060 | ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``. |
|
1061 | ``HKEY_CURRENT_USER`` and then under ``HKEY_LOCAL_MACHINE``. | |
1061 | Default: None |
|
1062 | Default: None | |
1062 |
|
1063 | |||
1063 | ``regkeyalt`` |
|
1064 | ``regkeyalt`` | |
1064 | An alternate Windows registry key to try if the first key is not |
|
1065 | An alternate Windows registry key to try if the first key is not | |
1065 | found. The alternate key uses the same ``regname`` and ``regappend`` |
|
1066 | found. The alternate key uses the same ``regname`` and ``regappend`` | |
1066 | semantics of the primary key. The most common use for this key |
|
1067 | semantics of the primary key. The most common use for this key | |
1067 | is to search for 32bit applications on 64bit operating systems. |
|
1068 | is to search for 32bit applications on 64bit operating systems. | |
1068 | Default: None |
|
1069 | Default: None | |
1069 |
|
1070 | |||
1070 | ``regname`` |
|
1071 | ``regname`` | |
1071 | Name of value to read from specified registry key. Defaults to the |
|
1072 | Name of value to read from specified registry key. Defaults to the | |
1072 | unnamed (default) value. |
|
1073 | unnamed (default) value. | |
1073 |
|
1074 | |||
1074 | ``regappend`` |
|
1075 | ``regappend`` | |
1075 | String to append to the value read from the registry, typically |
|
1076 | String to append to the value read from the registry, typically | |
1076 | the executable name of the tool. |
|
1077 | the executable name of the tool. | |
1077 | Default: None |
|
1078 | Default: None | |
1078 |
|
1079 | |||
1079 |
|
1080 | |||
1080 | ``patch`` |
|
1081 | ``patch`` | |
1081 | --------- |
|
1082 | --------- | |
1082 |
|
1083 | |||
1083 | Settings used when applying patches, for instance through the 'import' |
|
1084 | Settings used when applying patches, for instance through the 'import' | |
1084 | command or with Mercurial Queues extension. |
|
1085 | command or with Mercurial Queues extension. | |
1085 |
|
1086 | |||
1086 | ``eol`` |
|
1087 | ``eol`` | |
1087 | When set to 'strict' patch content and patched files end of lines |
|
1088 | When set to 'strict' patch content and patched files end of lines | |
1088 | are preserved. When set to ``lf`` or ``crlf``, both files end of |
|
1089 | are preserved. When set to ``lf`` or ``crlf``, both files end of | |
1089 | lines are ignored when patching and the result line endings are |
|
1090 | lines are ignored when patching and the result line endings are | |
1090 | normalized to either LF (Unix) or CRLF (Windows). When set to |
|
1091 | normalized to either LF (Unix) or CRLF (Windows). When set to | |
1091 | ``auto``, end of lines are again ignored while patching but line |
|
1092 | ``auto``, end of lines are again ignored while patching but line | |
1092 | endings in patched files are normalized to their original setting |
|
1093 | endings in patched files are normalized to their original setting | |
1093 | on a per-file basis. If target file does not exist or has no end |
|
1094 | on a per-file basis. If target file does not exist or has no end | |
1094 | of line, patch line endings are preserved. |
|
1095 | of line, patch line endings are preserved. | |
1095 | Default: strict. |
|
1096 | Default: strict. | |
1096 |
|
1097 | |||
1097 | ``fuzz`` |
|
1098 | ``fuzz`` | |
1098 | The number of lines of 'fuzz' to allow when applying patches. This |
|
1099 | The number of lines of 'fuzz' to allow when applying patches. This | |
1099 | controls how much context the patcher is allowed to ignore when |
|
1100 | controls how much context the patcher is allowed to ignore when | |
1100 | trying to apply a patch. |
|
1101 | trying to apply a patch. | |
1101 | Default: 2 |
|
1102 | Default: 2 | |
1102 |
|
1103 | |||
1103 | ``paths`` |
|
1104 | ``paths`` | |
1104 | --------- |
|
1105 | --------- | |
1105 |
|
1106 | |||
1106 | Assigns symbolic names to repositories. The left side is the |
|
1107 | Assigns symbolic names to repositories. The left side is the | |
1107 | symbolic name, and the right gives the directory or URL that is the |
|
1108 | symbolic name, and the right gives the directory or URL that is the | |
1108 | location of the repository. Default paths can be declared by setting |
|
1109 | location of the repository. Default paths can be declared by setting | |
1109 | the following entries. |
|
1110 | the following entries. | |
1110 |
|
1111 | |||
1111 | ``default`` |
|
1112 | ``default`` | |
1112 | Directory or URL to use when pulling if no source is specified. |
|
1113 | Directory or URL to use when pulling if no source is specified. | |
1113 | Default is set to repository from which the current repository was |
|
1114 | Default is set to repository from which the current repository was | |
1114 | cloned. |
|
1115 | cloned. | |
1115 |
|
1116 | |||
1116 | ``default-push`` |
|
1117 | ``default-push`` | |
1117 | Optional. Directory or URL to use when pushing if no destination |
|
1118 | Optional. Directory or URL to use when pushing if no destination | |
1118 | is specified. |
|
1119 | is specified. | |
1119 |
|
1120 | |||
1120 | Custom paths can be defined by assigning the path to a name that later can be |
|
1121 | Custom paths can be defined by assigning the path to a name that later can be | |
1121 | used from the command line. Example:: |
|
1122 | used from the command line. Example:: | |
1122 |
|
1123 | |||
1123 | [paths] |
|
1124 | [paths] | |
1124 | my_path = http://example.com/path |
|
1125 | my_path = http://example.com/path | |
1125 |
|
1126 | |||
1126 | To push to the path defined in ``my_path`` run the command:: |
|
1127 | To push to the path defined in ``my_path`` run the command:: | |
1127 |
|
1128 | |||
1128 | hg push my_path |
|
1129 | hg push my_path | |
1129 |
|
1130 | |||
1130 |
|
1131 | |||
1131 | ``phases`` |
|
1132 | ``phases`` | |
1132 | ---------- |
|
1133 | ---------- | |
1133 |
|
1134 | |||
1134 | Specifies default handling of phases. See :hg:`help phases` for more |
|
1135 | Specifies default handling of phases. See :hg:`help phases` for more | |
1135 | information about working with phases. |
|
1136 | information about working with phases. | |
1136 |
|
1137 | |||
1137 | ``publish`` |
|
1138 | ``publish`` | |
1138 | Controls draft phase behavior when working as a server. When true, |
|
1139 | Controls draft phase behavior when working as a server. When true, | |
1139 | pushed changesets are set to public in both client and server and |
|
1140 | pushed changesets are set to public in both client and server and | |
1140 | pulled or cloned changesets are set to public in the client. |
|
1141 | pulled or cloned changesets are set to public in the client. | |
1141 | Default: True |
|
1142 | Default: True | |
1142 |
|
1143 | |||
1143 | ``new-commit`` |
|
1144 | ``new-commit`` | |
1144 | Phase of newly-created commits. |
|
1145 | Phase of newly-created commits. | |
1145 | Default: draft |
|
1146 | Default: draft | |
1146 |
|
1147 | |||
1147 | ``checksubrepos`` |
|
1148 | ``checksubrepos`` | |
1148 | Check the phase of the current revision of each subrepository. Allowed |
|
1149 | Check the phase of the current revision of each subrepository. Allowed | |
1149 | values are "ignore", "follow" and "abort". For settings other than |
|
1150 | values are "ignore", "follow" and "abort". For settings other than | |
1150 | "ignore", the phase of the current revision of each subrepository is |
|
1151 | "ignore", the phase of the current revision of each subrepository is | |
1151 | checked before committing the parent repository. If any of those phases is |
|
1152 | checked before committing the parent repository. If any of those phases is | |
1152 | greater than the phase of the parent repository (e.g. if a subrepo is in a |
|
1153 | greater than the phase of the parent repository (e.g. if a subrepo is in a | |
1153 | "secret" phase while the parent repo is in "draft" phase), the commit is |
|
1154 | "secret" phase while the parent repo is in "draft" phase), the commit is | |
1154 | either aborted (if checksubrepos is set to "abort") or the higher phase is |
|
1155 | either aborted (if checksubrepos is set to "abort") or the higher phase is | |
1155 | used for the parent repository commit (if set to "follow"). |
|
1156 | used for the parent repository commit (if set to "follow"). | |
1156 | Default: "follow" |
|
1157 | Default: "follow" | |
1157 |
|
1158 | |||
1158 |
|
1159 | |||
1159 | ``profiling`` |
|
1160 | ``profiling`` | |
1160 | ------------- |
|
1161 | ------------- | |
1161 |
|
1162 | |||
1162 | Specifies profiling type, format, and file output. Two profilers are |
|
1163 | Specifies profiling type, format, and file output. Two profilers are | |
1163 | supported: an instrumenting profiler (named ``ls``), and a sampling |
|
1164 | supported: an instrumenting profiler (named ``ls``), and a sampling | |
1164 | profiler (named ``stat``). |
|
1165 | profiler (named ``stat``). | |
1165 |
|
1166 | |||
1166 | In this section description, 'profiling data' stands for the raw data |
|
1167 | In this section description, 'profiling data' stands for the raw data | |
1167 | collected during profiling, while 'profiling report' stands for a |
|
1168 | collected during profiling, while 'profiling report' stands for a | |
1168 | statistical text report generated from the profiling data. The |
|
1169 | statistical text report generated from the profiling data. The | |
1169 | profiling is done using lsprof. |
|
1170 | profiling is done using lsprof. | |
1170 |
|
1171 | |||
1171 | ``type`` |
|
1172 | ``type`` | |
1172 | The type of profiler to use. |
|
1173 | The type of profiler to use. | |
1173 | Default: ls. |
|
1174 | Default: ls. | |
1174 |
|
1175 | |||
1175 | ``ls`` |
|
1176 | ``ls`` | |
1176 | Use Python's built-in instrumenting profiler. This profiler |
|
1177 | Use Python's built-in instrumenting profiler. This profiler | |
1177 | works on all platforms, but each line number it reports is the |
|
1178 | works on all platforms, but each line number it reports is the | |
1178 | first line of a function. This restriction makes it difficult to |
|
1179 | first line of a function. This restriction makes it difficult to | |
1179 | identify the expensive parts of a non-trivial function. |
|
1180 | identify the expensive parts of a non-trivial function. | |
1180 | ``stat`` |
|
1181 | ``stat`` | |
1181 | Use a third-party statistical profiler, statprof. This profiler |
|
1182 | Use a third-party statistical profiler, statprof. This profiler | |
1182 | currently runs only on Unix systems, and is most useful for |
|
1183 | currently runs only on Unix systems, and is most useful for | |
1183 | profiling commands that run for longer than about 0.1 seconds. |
|
1184 | profiling commands that run for longer than about 0.1 seconds. | |
1184 |
|
1185 | |||
1185 | ``format`` |
|
1186 | ``format`` | |
1186 | Profiling format. Specific to the ``ls`` instrumenting profiler. |
|
1187 | Profiling format. Specific to the ``ls`` instrumenting profiler. | |
1187 | Default: text. |
|
1188 | Default: text. | |
1188 |
|
1189 | |||
1189 | ``text`` |
|
1190 | ``text`` | |
1190 | Generate a profiling report. When saving to a file, it should be |
|
1191 | Generate a profiling report. When saving to a file, it should be | |
1191 | noted that only the report is saved, and the profiling data is |
|
1192 | noted that only the report is saved, and the profiling data is | |
1192 | not kept. |
|
1193 | not kept. | |
1193 | ``kcachegrind`` |
|
1194 | ``kcachegrind`` | |
1194 | Format profiling data for kcachegrind use: when saving to a |
|
1195 | Format profiling data for kcachegrind use: when saving to a | |
1195 | file, the generated file can directly be loaded into |
|
1196 | file, the generated file can directly be loaded into | |
1196 | kcachegrind. |
|
1197 | kcachegrind. | |
1197 |
|
1198 | |||
1198 | ``frequency`` |
|
1199 | ``frequency`` | |
1199 | Sampling frequency. Specific to the ``stat`` sampling profiler. |
|
1200 | Sampling frequency. Specific to the ``stat`` sampling profiler. | |
1200 | Default: 1000. |
|
1201 | Default: 1000. | |
1201 |
|
1202 | |||
1202 | ``output`` |
|
1203 | ``output`` | |
1203 | File path where profiling data or report should be saved. If the |
|
1204 | File path where profiling data or report should be saved. If the | |
1204 | file exists, it is replaced. Default: None, data is printed on |
|
1205 | file exists, it is replaced. Default: None, data is printed on | |
1205 | stderr |
|
1206 | stderr | |
1206 |
|
1207 | |||
1207 | ``sort`` |
|
1208 | ``sort`` | |
1208 | Sort field. Specific to the ``ls`` instrumenting profiler. |
|
1209 | Sort field. Specific to the ``ls`` instrumenting profiler. | |
1209 | One of ``callcount``, ``reccallcount``, ``totaltime`` and |
|
1210 | One of ``callcount``, ``reccallcount``, ``totaltime`` and | |
1210 | ``inlinetime``. |
|
1211 | ``inlinetime``. | |
1211 | Default: inlinetime. |
|
1212 | Default: inlinetime. | |
1212 |
|
1213 | |||
1213 | ``limit`` |
|
1214 | ``limit`` | |
1214 | Number of lines to show. Specific to the ``ls`` instrumenting profiler. |
|
1215 | Number of lines to show. Specific to the ``ls`` instrumenting profiler. | |
1215 | Default: 30. |
|
1216 | Default: 30. | |
1216 |
|
1217 | |||
1217 | ``nested`` |
|
1218 | ``nested`` | |
1218 | Show at most this number of lines of drill-down info after each main entry. |
|
1219 | Show at most this number of lines of drill-down info after each main entry. | |
1219 | This can help explain the difference between Total and Inline. |
|
1220 | This can help explain the difference between Total and Inline. | |
1220 | Specific to the ``ls`` instrumenting profiler. |
|
1221 | Specific to the ``ls`` instrumenting profiler. | |
1221 | Default: 5. |
|
1222 | Default: 5. | |
1222 |
|
1223 | |||
1223 | ``progress`` |
|
1224 | ``progress`` | |
1224 | ------------ |
|
1225 | ------------ | |
1225 |
|
1226 | |||
1226 | Mercurial commands can draw progress bars that are as informative as |
|
1227 | Mercurial commands can draw progress bars that are as informative as | |
1227 | possible. Some progress bars only offer indeterminate information, while others |
|
1228 | possible. Some progress bars only offer indeterminate information, while others | |
1228 | have a definite end point. |
|
1229 | have a definite end point. | |
1229 |
|
1230 | |||
1230 | ``delay`` |
|
1231 | ``delay`` | |
1231 | Number of seconds (float) before showing the progress bar. (default: 3) |
|
1232 | Number of seconds (float) before showing the progress bar. (default: 3) | |
1232 |
|
1233 | |||
1233 | ``changedelay`` |
|
1234 | ``changedelay`` | |
1234 | Minimum delay before showing a new topic. When set to less than 3 * refresh, |
|
1235 | Minimum delay before showing a new topic. When set to less than 3 * refresh, | |
1235 | that value will be used instead. (default: 1) |
|
1236 | that value will be used instead. (default: 1) | |
1236 |
|
1237 | |||
1237 | ``refresh`` |
|
1238 | ``refresh`` | |
1238 | Time in seconds between refreshes of the progress bar. (default: 0.1) |
|
1239 | Time in seconds between refreshes of the progress bar. (default: 0.1) | |
1239 |
|
1240 | |||
1240 | ``format`` |
|
1241 | ``format`` | |
1241 | Format of the progress bar. |
|
1242 | Format of the progress bar. | |
1242 |
|
1243 | |||
1243 | Valid entries for the format field are ``topic``, ``bar``, ``number``, |
|
1244 | Valid entries for the format field are ``topic``, ``bar``, ``number``, | |
1244 | ``unit``, ``estimate``, speed, and item. item defaults to the last 20 |
|
1245 | ``unit``, ``estimate``, speed, and item. item defaults to the last 20 | |
1245 | characters of the item, but this can be changed by adding either ``-<num>`` |
|
1246 | characters of the item, but this can be changed by adding either ``-<num>`` | |
1246 | which would take the last num characters, or ``+<num>`` for the first num |
|
1247 | which would take the last num characters, or ``+<num>`` for the first num | |
1247 | characters. |
|
1248 | characters. | |
1248 |
|
1249 | |||
1249 | (default: Topic bar number estimate) |
|
1250 | (default: Topic bar number estimate) | |
1250 |
|
1251 | |||
1251 | ``width`` |
|
1252 | ``width`` | |
1252 | If set, the maximum width of the progress information (that is, min(width, |
|
1253 | If set, the maximum width of the progress information (that is, min(width, | |
1253 | term width) will be used) |
|
1254 | term width) will be used) | |
1254 |
|
1255 | |||
1255 | ``clear-complete`` |
|
1256 | ``clear-complete`` | |
1256 | clear the progress bar after it's done (default to True) |
|
1257 | clear the progress bar after it's done (default to True) | |
1257 |
|
1258 | |||
1258 | ``disable`` |
|
1259 | ``disable`` | |
1259 | If true, don't show a progress bar |
|
1260 | If true, don't show a progress bar | |
1260 |
|
1261 | |||
1261 | ``assume-tty`` |
|
1262 | ``assume-tty`` | |
1262 | If true, ALWAYS show a progress bar, unless disable is given |
|
1263 | If true, ALWAYS show a progress bar, unless disable is given | |
1263 |
|
1264 | |||
1264 | ``revsetalias`` |
|
1265 | ``revsetalias`` | |
1265 | --------------- |
|
1266 | --------------- | |
1266 |
|
1267 | |||
1267 | Alias definitions for revsets. See :hg:`help revsets` for details. |
|
1268 | Alias definitions for revsets. See :hg:`help revsets` for details. | |
1268 |
|
1269 | |||
1269 | ``server`` |
|
1270 | ``server`` | |
1270 | ---------- |
|
1271 | ---------- | |
1271 |
|
1272 | |||
1272 | Controls generic server settings. |
|
1273 | Controls generic server settings. | |
1273 |
|
1274 | |||
1274 | ``uncompressed`` |
|
1275 | ``uncompressed`` | |
1275 | Whether to allow clients to clone a repository using the |
|
1276 | Whether to allow clients to clone a repository using the | |
1276 | uncompressed streaming protocol. This transfers about 40% more |
|
1277 | uncompressed streaming protocol. This transfers about 40% more | |
1277 | data than a regular clone, but uses less memory and CPU on both |
|
1278 | data than a regular clone, but uses less memory and CPU on both | |
1278 | server and client. Over a LAN (100 Mbps or better) or a very fast |
|
1279 | server and client. Over a LAN (100 Mbps or better) or a very fast | |
1279 | WAN, an uncompressed streaming clone is a lot faster (~10x) than a |
|
1280 | WAN, an uncompressed streaming clone is a lot faster (~10x) than a | |
1280 | regular clone. Over most WAN connections (anything slower than |
|
1281 | regular clone. Over most WAN connections (anything slower than | |
1281 | about 6 Mbps), uncompressed streaming is slower, because of the |
|
1282 | about 6 Mbps), uncompressed streaming is slower, because of the | |
1282 | extra data transfer overhead. This mode will also temporarily hold |
|
1283 | extra data transfer overhead. This mode will also temporarily hold | |
1283 | the write lock while determining what data to transfer. |
|
1284 | the write lock while determining what data to transfer. | |
1284 | Default is True. |
|
1285 | Default is True. | |
1285 |
|
1286 | |||
1286 | ``preferuncompressed`` |
|
1287 | ``preferuncompressed`` | |
1287 | When set, clients will try to use the uncompressed streaming |
|
1288 | When set, clients will try to use the uncompressed streaming | |
1288 | protocol. Default is False. |
|
1289 | protocol. Default is False. | |
1289 |
|
1290 | |||
1290 | ``validate`` |
|
1291 | ``validate`` | |
1291 | Whether to validate the completeness of pushed changesets by |
|
1292 | Whether to validate the completeness of pushed changesets by | |
1292 | checking that all new file revisions specified in manifests are |
|
1293 | checking that all new file revisions specified in manifests are | |
1293 | present. Default is False. |
|
1294 | present. Default is False. | |
1294 |
|
1295 | |||
1295 | ``maxhttpheaderlen`` |
|
1296 | ``maxhttpheaderlen`` | |
1296 | Instruct HTTP clients not to send request headers longer than this |
|
1297 | Instruct HTTP clients not to send request headers longer than this | |
1297 | many bytes. Default is 1024. |
|
1298 | many bytes. Default is 1024. | |
1298 |
|
1299 | |||
1299 | ``smtp`` |
|
1300 | ``smtp`` | |
1300 | -------- |
|
1301 | -------- | |
1301 |
|
1302 | |||
1302 | Configuration for extensions that need to send email messages. |
|
1303 | Configuration for extensions that need to send email messages. | |
1303 |
|
1304 | |||
1304 | ``host`` |
|
1305 | ``host`` | |
1305 | Host name of mail server, e.g. "mail.example.com". |
|
1306 | Host name of mail server, e.g. "mail.example.com". | |
1306 |
|
1307 | |||
1307 | ``port`` |
|
1308 | ``port`` | |
1308 | Optional. Port to connect to on mail server. Default: 465 (if |
|
1309 | Optional. Port to connect to on mail server. Default: 465 (if | |
1309 | ``tls`` is smtps) or 25 (otherwise). |
|
1310 | ``tls`` is smtps) or 25 (otherwise). | |
1310 |
|
1311 | |||
1311 | ``tls`` |
|
1312 | ``tls`` | |
1312 | Optional. Method to enable TLS when connecting to mail server: starttls, |
|
1313 | Optional. Method to enable TLS when connecting to mail server: starttls, | |
1313 | smtps or none. Default: none. |
|
1314 | smtps or none. Default: none. | |
1314 |
|
1315 | |||
1315 | ``verifycert`` |
|
1316 | ``verifycert`` | |
1316 | Optional. Verification for the certificate of mail server, when |
|
1317 | Optional. Verification for the certificate of mail server, when | |
1317 | ``tls`` is starttls or smtps. "strict", "loose" or False. For |
|
1318 | ``tls`` is starttls or smtps. "strict", "loose" or False. For | |
1318 | "strict" or "loose", the certificate is verified as same as the |
|
1319 | "strict" or "loose", the certificate is verified as same as the | |
1319 | verification for HTTPS connections (see ``[hostfingerprints]`` and |
|
1320 | verification for HTTPS connections (see ``[hostfingerprints]`` and | |
1320 | ``[web] cacerts`` also). For "strict", sending email is also |
|
1321 | ``[web] cacerts`` also). For "strict", sending email is also | |
1321 | aborted, if there is no configuration for mail server in |
|
1322 | aborted, if there is no configuration for mail server in | |
1322 | ``[hostfingerprints]`` and ``[web] cacerts``. --insecure for |
|
1323 | ``[hostfingerprints]`` and ``[web] cacerts``. --insecure for | |
1323 | :hg:`email` overwrites this as "loose". Default: "strict". |
|
1324 | :hg:`email` overwrites this as "loose". Default: "strict". | |
1324 |
|
1325 | |||
1325 | ``username`` |
|
1326 | ``username`` | |
1326 | Optional. User name for authenticating with the SMTP server. |
|
1327 | Optional. User name for authenticating with the SMTP server. | |
1327 | Default: none. |
|
1328 | Default: none. | |
1328 |
|
1329 | |||
1329 | ``password`` |
|
1330 | ``password`` | |
1330 | Optional. Password for authenticating with the SMTP server. If not |
|
1331 | Optional. Password for authenticating with the SMTP server. If not | |
1331 | specified, interactive sessions will prompt the user for a |
|
1332 | specified, interactive sessions will prompt the user for a | |
1332 | password; non-interactive sessions will fail. Default: none. |
|
1333 | password; non-interactive sessions will fail. Default: none. | |
1333 |
|
1334 | |||
1334 | ``local_hostname`` |
|
1335 | ``local_hostname`` | |
1335 | Optional. It's the hostname that the sender can use to identify |
|
1336 | Optional. It's the hostname that the sender can use to identify | |
1336 | itself to the MTA. |
|
1337 | itself to the MTA. | |
1337 |
|
1338 | |||
1338 |
|
1339 | |||
1339 | ``subpaths`` |
|
1340 | ``subpaths`` | |
1340 | ------------ |
|
1341 | ------------ | |
1341 |
|
1342 | |||
1342 | Subrepository source URLs can go stale if a remote server changes name |
|
1343 | Subrepository source URLs can go stale if a remote server changes name | |
1343 | or becomes temporarily unavailable. This section lets you define |
|
1344 | or becomes temporarily unavailable. This section lets you define | |
1344 | rewrite rules of the form:: |
|
1345 | rewrite rules of the form:: | |
1345 |
|
1346 | |||
1346 | <pattern> = <replacement> |
|
1347 | <pattern> = <replacement> | |
1347 |
|
1348 | |||
1348 | where ``pattern`` is a regular expression matching a subrepository |
|
1349 | where ``pattern`` is a regular expression matching a subrepository | |
1349 | source URL and ``replacement`` is the replacement string used to |
|
1350 | source URL and ``replacement`` is the replacement string used to | |
1350 | rewrite it. Groups can be matched in ``pattern`` and referenced in |
|
1351 | rewrite it. Groups can be matched in ``pattern`` and referenced in | |
1351 | ``replacements``. For instance:: |
|
1352 | ``replacements``. For instance:: | |
1352 |
|
1353 | |||
1353 | http://server/(.*)-hg/ = http://hg.server/\1/ |
|
1354 | http://server/(.*)-hg/ = http://hg.server/\1/ | |
1354 |
|
1355 | |||
1355 | rewrites ``http://server/foo-hg/`` into ``http://hg.server/foo/``. |
|
1356 | rewrites ``http://server/foo-hg/`` into ``http://hg.server/foo/``. | |
1356 |
|
1357 | |||
1357 | Relative subrepository paths are first made absolute, and the |
|
1358 | Relative subrepository paths are first made absolute, and the | |
1358 | rewrite rules are then applied on the full (absolute) path. The rules |
|
1359 | rewrite rules are then applied on the full (absolute) path. The rules | |
1359 | are applied in definition order. |
|
1360 | are applied in definition order. | |
1360 |
|
1361 | |||
1361 | ``trusted`` |
|
1362 | ``trusted`` | |
1362 | ----------- |
|
1363 | ----------- | |
1363 |
|
1364 | |||
1364 | Mercurial will not use the settings in the |
|
1365 | Mercurial will not use the settings in the | |
1365 | ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted |
|
1366 | ``.hg/hgrc`` file from a repository if it doesn't belong to a trusted | |
1366 | user or to a trusted group, as various hgrc features allow arbitrary |
|
1367 | user or to a trusted group, as various hgrc features allow arbitrary | |
1367 | commands to be run. This issue is often encountered when configuring |
|
1368 | commands to be run. This issue is often encountered when configuring | |
1368 | hooks or extensions for shared repositories or servers. However, |
|
1369 | hooks or extensions for shared repositories or servers. However, | |
1369 | the web interface will use some safe settings from the ``[web]`` |
|
1370 | the web interface will use some safe settings from the ``[web]`` | |
1370 | section. |
|
1371 | section. | |
1371 |
|
1372 | |||
1372 | This section specifies what users and groups are trusted. The |
|
1373 | This section specifies what users and groups are trusted. The | |
1373 | current user is always trusted. To trust everybody, list a user or a |
|
1374 | current user is always trusted. To trust everybody, list a user or a | |
1374 | group with name ``*``. These settings must be placed in an |
|
1375 | group with name ``*``. These settings must be placed in an | |
1375 | *already-trusted file* to take effect, such as ``$HOME/.hgrc`` of the |
|
1376 | *already-trusted file* to take effect, such as ``$HOME/.hgrc`` of the | |
1376 | user or service running Mercurial. |
|
1377 | user or service running Mercurial. | |
1377 |
|
1378 | |||
1378 | ``users`` |
|
1379 | ``users`` | |
1379 | Comma-separated list of trusted users. |
|
1380 | Comma-separated list of trusted users. | |
1380 |
|
1381 | |||
1381 | ``groups`` |
|
1382 | ``groups`` | |
1382 | Comma-separated list of trusted groups. |
|
1383 | Comma-separated list of trusted groups. | |
1383 |
|
1384 | |||
1384 |
|
1385 | |||
1385 | ``ui`` |
|
1386 | ``ui`` | |
1386 | ------ |
|
1387 | ------ | |
1387 |
|
1388 | |||
1388 | User interface controls. |
|
1389 | User interface controls. | |
1389 |
|
1390 | |||
1390 | ``archivemeta`` |
|
1391 | ``archivemeta`` | |
1391 | Whether to include the .hg_archival.txt file containing meta data |
|
1392 | Whether to include the .hg_archival.txt file containing meta data | |
1392 | (hashes for the repository base and for tip) in archives created |
|
1393 | (hashes for the repository base and for tip) in archives created | |
1393 | by the :hg:`archive` command or downloaded via hgweb. |
|
1394 | by the :hg:`archive` command or downloaded via hgweb. | |
1394 | Default is True. |
|
1395 | Default is True. | |
1395 |
|
1396 | |||
1396 | ``askusername`` |
|
1397 | ``askusername`` | |
1397 | Whether to prompt for a username when committing. If True, and |
|
1398 | Whether to prompt for a username when committing. If True, and | |
1398 | neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will |
|
1399 | neither ``$HGUSER`` nor ``$EMAIL`` has been specified, then the user will | |
1399 | be prompted to enter a username. If no username is entered, the |
|
1400 | be prompted to enter a username. If no username is entered, the | |
1400 | default ``USER@HOST`` is used instead. |
|
1401 | default ``USER@HOST`` is used instead. | |
1401 | Default is False. |
|
1402 | Default is False. | |
1402 |
|
1403 | |||
1403 | ``commitsubrepos`` |
|
1404 | ``commitsubrepos`` | |
1404 | Whether to commit modified subrepositories when committing the |
|
1405 | Whether to commit modified subrepositories when committing the | |
1405 | parent repository. If False and one subrepository has uncommitted |
|
1406 | parent repository. If False and one subrepository has uncommitted | |
1406 | changes, abort the commit. |
|
1407 | changes, abort the commit. | |
1407 | Default is False. |
|
1408 | Default is False. | |
1408 |
|
1409 | |||
1409 | ``debug`` |
|
1410 | ``debug`` | |
1410 | Print debugging information. True or False. Default is False. |
|
1411 | Print debugging information. True or False. Default is False. | |
1411 |
|
1412 | |||
1412 | ``editor`` |
|
1413 | ``editor`` | |
1413 | The editor to use during a commit. Default is ``$EDITOR`` or ``vi``. |
|
1414 | The editor to use during a commit. Default is ``$EDITOR`` or ``vi``. | |
1414 |
|
1415 | |||
1415 | ``fallbackencoding`` |
|
1416 | ``fallbackencoding`` | |
1416 | Encoding to try if it's not possible to decode the changelog using |
|
1417 | Encoding to try if it's not possible to decode the changelog using | |
1417 | UTF-8. Default is ISO-8859-1. |
|
1418 | UTF-8. Default is ISO-8859-1. | |
1418 |
|
1419 | |||
1419 | ``ignore`` |
|
1420 | ``ignore`` | |
1420 | A file to read per-user ignore patterns from. This file should be |
|
1421 | A file to read per-user ignore patterns from. This file should be | |
1421 | in the same format as a repository-wide .hgignore file. Filenames |
|
1422 | in the same format as a repository-wide .hgignore file. Filenames | |
1422 | are relative to the repository root. This option supports hook syntax, |
|
1423 | are relative to the repository root. This option supports hook syntax, | |
1423 | so if you want to specify multiple ignore files, you can do so by |
|
1424 | so if you want to specify multiple ignore files, you can do so by | |
1424 | setting something like ``ignore.other = ~/.hgignore2``. For details |
|
1425 | setting something like ``ignore.other = ~/.hgignore2``. For details | |
1425 | of the ignore file format, see the ``hgignore(5)`` man page. |
|
1426 | of the ignore file format, see the ``hgignore(5)`` man page. | |
1426 |
|
1427 | |||
1427 | ``interactive`` |
|
1428 | ``interactive`` | |
1428 | Allow to prompt the user. True or False. Default is True. |
|
1429 | Allow to prompt the user. True or False. Default is True. | |
1429 |
|
1430 | |||
1430 | ``logtemplate`` |
|
1431 | ``logtemplate`` | |
1431 | Template string for commands that print changesets. |
|
1432 | Template string for commands that print changesets. | |
1432 |
|
1433 | |||
1433 | ``merge`` |
|
1434 | ``merge`` | |
1434 | The conflict resolution program to use during a manual merge. |
|
1435 | The conflict resolution program to use during a manual merge. | |
1435 | For more information on merge tools see :hg:`help merge-tools`. |
|
1436 | For more information on merge tools see :hg:`help merge-tools`. | |
1436 | For configuring merge tools see the ``[merge-tools]`` section. |
|
1437 | For configuring merge tools see the ``[merge-tools]`` section. | |
1437 |
|
1438 | |||
1438 | ``mergemarkers`` |
|
1439 | ``mergemarkers`` | |
1439 | Sets the merge conflict marker label styling. The ``detailed`` |
|
1440 | Sets the merge conflict marker label styling. The ``detailed`` | |
1440 | style uses the ``mergemarkertemplate`` setting to style the labels. |
|
1441 | style uses the ``mergemarkertemplate`` setting to style the labels. | |
1441 | The ``basic`` style just uses 'local' and 'other' as the marker label. |
|
1442 | The ``basic`` style just uses 'local' and 'other' as the marker label. | |
1442 | One of ``basic`` or ``detailed``. |
|
1443 | One of ``basic`` or ``detailed``. | |
1443 | Default is ``basic``. |
|
1444 | Default is ``basic``. | |
1444 |
|
1445 | |||
1445 | ``mergemarkertemplate`` |
|
1446 | ``mergemarkertemplate`` | |
1446 | The template used to print the commit description next to each conflict |
|
1447 | The template used to print the commit description next to each conflict | |
1447 | marker during merge conflicts. See :hg:`help templates` for the template |
|
1448 | marker during merge conflicts. See :hg:`help templates` for the template | |
1448 | format. |
|
1449 | format. | |
|
1450 | ||||
1449 | Defaults to showing the hash, tags, branches, bookmarks, author, and |
|
1451 | Defaults to showing the hash, tags, branches, bookmarks, author, and | |
1450 | the first line of the commit description. |
|
1452 | the first line of the commit description. | |
|
1453 | ||||
1451 | If you use non-ASCII characters in names for tags, branches, bookmarks, |
|
1454 | If you use non-ASCII characters in names for tags, branches, bookmarks, | |
1452 | authors, and/or commit descriptions, you must pay attention to encodings of |
|
1455 | authors, and/or commit descriptions, you must pay attention to encodings of | |
1453 | managed files. At template expansion, non-ASCII characters use the encoding |
|
1456 | managed files. At template expansion, non-ASCII characters use the encoding | |
1454 | specified by the ``--encoding`` global option, ``HGENCODING`` or other |
|
1457 | specified by the ``--encoding`` global option, ``HGENCODING`` or other | |
1455 | environment variables that govern your locale. If the encoding of the merge |
|
1458 | environment variables that govern your locale. If the encoding of the merge | |
1456 | markers is different from the encoding of the merged files, |
|
1459 | markers is different from the encoding of the merged files, | |
1457 | serious problems may occur. |
|
1460 | serious problems may occur. | |
1458 |
|
1461 | |||
1459 | ``patch`` |
|
1462 | ``patch`` | |
1460 | An optional external tool that ``hg import`` and some extensions |
|
1463 | An optional external tool that ``hg import`` and some extensions | |
1461 | will use for applying patches. By default Mercurial uses an |
|
1464 | will use for applying patches. By default Mercurial uses an | |
1462 | internal patch utility. The external tool must work as the common |
|
1465 | internal patch utility. The external tool must work as the common | |
1463 | Unix ``patch`` program. In particular, it must accept a ``-p`` |
|
1466 | Unix ``patch`` program. In particular, it must accept a ``-p`` | |
1464 | argument to strip patch headers, a ``-d`` argument to specify the |
|
1467 | argument to strip patch headers, a ``-d`` argument to specify the | |
1465 | current directory, a file name to patch, and a patch file to take |
|
1468 | current directory, a file name to patch, and a patch file to take | |
1466 | from stdin. |
|
1469 | from stdin. | |
1467 |
|
1470 | |||
1468 | It is possible to specify a patch tool together with extra |
|
1471 | It is possible to specify a patch tool together with extra | |
1469 | arguments. For example, setting this option to ``patch --merge`` |
|
1472 | arguments. For example, setting this option to ``patch --merge`` | |
1470 | will use the ``patch`` program with its 2-way merge option. |
|
1473 | will use the ``patch`` program with its 2-way merge option. | |
1471 |
|
1474 | |||
1472 | ``portablefilenames`` |
|
1475 | ``portablefilenames`` | |
1473 | Check for portable filenames. Can be ``warn``, ``ignore`` or ``abort``. |
|
1476 | Check for portable filenames. Can be ``warn``, ``ignore`` or ``abort``. | |
1474 | Default is ``warn``. |
|
1477 | Default is ``warn``. | |
1475 | If set to ``warn`` (or ``true``), a warning message is printed on POSIX |
|
1478 | If set to ``warn`` (or ``true``), a warning message is printed on POSIX | |
1476 | platforms, if a file with a non-portable filename is added (e.g. a file |
|
1479 | platforms, if a file with a non-portable filename is added (e.g. a file | |
1477 | with a name that can't be created on Windows because it contains reserved |
|
1480 | with a name that can't be created on Windows because it contains reserved | |
1478 | parts like ``AUX``, reserved characters like ``:``, or would cause a case |
|
1481 | parts like ``AUX``, reserved characters like ``:``, or would cause a case | |
1479 | collision with an existing file). |
|
1482 | collision with an existing file). | |
1480 | If set to ``ignore`` (or ``false``), no warning is printed. |
|
1483 | If set to ``ignore`` (or ``false``), no warning is printed. | |
1481 | If set to ``abort``, the command is aborted. |
|
1484 | If set to ``abort``, the command is aborted. | |
1482 | On Windows, this configuration option is ignored and the command aborted. |
|
1485 | On Windows, this configuration option is ignored and the command aborted. | |
1483 |
|
1486 | |||
1484 | ``quiet`` |
|
1487 | ``quiet`` | |
1485 | Reduce the amount of output printed. True or False. Default is False. |
|
1488 | Reduce the amount of output printed. True or False. Default is False. | |
1486 |
|
1489 | |||
1487 | ``remotecmd`` |
|
1490 | ``remotecmd`` | |
1488 | remote command to use for clone/push/pull operations. Default is ``hg``. |
|
1491 | remote command to use for clone/push/pull operations. Default is ``hg``. | |
1489 |
|
1492 | |||
1490 | ``report_untrusted`` |
|
1493 | ``report_untrusted`` | |
1491 | Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a |
|
1494 | Warn if a ``.hg/hgrc`` file is ignored due to not being owned by a | |
1492 | trusted user or group. True or False. Default is True. |
|
1495 | trusted user or group. True or False. Default is True. | |
1493 |
|
1496 | |||
1494 | ``slash`` |
|
1497 | ``slash`` | |
1495 | Display paths using a slash (``/``) as the path separator. This |
|
1498 | Display paths using a slash (``/``) as the path separator. This | |
1496 | only makes a difference on systems where the default path |
|
1499 | only makes a difference on systems where the default path | |
1497 | separator is not the slash character (e.g. Windows uses the |
|
1500 | separator is not the slash character (e.g. Windows uses the | |
1498 | backslash character (``\``)). |
|
1501 | backslash character (``\``)). | |
1499 | Default is False. |
|
1502 | Default is False. | |
1500 |
|
1503 | |||
1501 | ``statuscopies`` |
|
1504 | ``statuscopies`` | |
1502 | Display copies in the status command. |
|
1505 | Display copies in the status command. | |
1503 |
|
1506 | |||
1504 | ``ssh`` |
|
1507 | ``ssh`` | |
1505 | command to use for SSH connections. Default is ``ssh``. |
|
1508 | command to use for SSH connections. Default is ``ssh``. | |
1506 |
|
1509 | |||
1507 | ``strict`` |
|
1510 | ``strict`` | |
1508 | Require exact command names, instead of allowing unambiguous |
|
1511 | Require exact command names, instead of allowing unambiguous | |
1509 | abbreviations. True or False. Default is False. |
|
1512 | abbreviations. True or False. Default is False. | |
1510 |
|
1513 | |||
1511 | ``style`` |
|
1514 | ``style`` | |
1512 | Name of style to use for command output. |
|
1515 | Name of style to use for command output. | |
1513 |
|
1516 | |||
1514 | ``timeout`` |
|
1517 | ``timeout`` | |
1515 | The timeout used when a lock is held (in seconds), a negative value |
|
1518 | The timeout used when a lock is held (in seconds), a negative value | |
1516 | means no timeout. Default is 600. |
|
1519 | means no timeout. Default is 600. | |
1517 |
|
1520 | |||
1518 | ``traceback`` |
|
1521 | ``traceback`` | |
1519 | Mercurial always prints a traceback when an unknown exception |
|
1522 | Mercurial always prints a traceback when an unknown exception | |
1520 | occurs. Setting this to True will make Mercurial print a traceback |
|
1523 | occurs. Setting this to True will make Mercurial print a traceback | |
1521 | on all exceptions, even those recognized by Mercurial (such as |
|
1524 | on all exceptions, even those recognized by Mercurial (such as | |
1522 | IOError or MemoryError). Default is False. |
|
1525 | IOError or MemoryError). Default is False. | |
1523 |
|
1526 | |||
1524 | ``username`` |
|
1527 | ``username`` | |
1525 | The committer of a changeset created when running "commit". |
|
1528 | The committer of a changeset created when running "commit". | |
1526 | Typically a person's name and email address, e.g. ``Fred Widget |
|
1529 | Typically a person's name and email address, e.g. ``Fred Widget | |
1527 | <fred@example.com>``. Default is ``$EMAIL`` or ``username@hostname``. If |
|
1530 | <fred@example.com>``. Default is ``$EMAIL`` or ``username@hostname``. If | |
1528 | the username in hgrc is empty, it has to be specified manually or |
|
1531 | the username in hgrc is empty, it has to be specified manually or | |
1529 | in a different hgrc file (e.g. ``$HOME/.hgrc``, if the admin set |
|
1532 | in a different hgrc file (e.g. ``$HOME/.hgrc``, if the admin set | |
1530 | ``username =`` in the system hgrc). Environment variables in the |
|
1533 | ``username =`` in the system hgrc). Environment variables in the | |
1531 | username are expanded. |
|
1534 | username are expanded. | |
1532 |
|
1535 | |||
1533 | ``verbose`` |
|
1536 | ``verbose`` | |
1534 | Increase the amount of output printed. True or False. Default is False. |
|
1537 | Increase the amount of output printed. True or False. Default is False. | |
1535 |
|
1538 | |||
1536 |
|
1539 | |||
1537 | ``web`` |
|
1540 | ``web`` | |
1538 | ------- |
|
1541 | ------- | |
1539 |
|
1542 | |||
1540 | Web interface configuration. The settings in this section apply to |
|
1543 | Web interface configuration. The settings in this section apply to | |
1541 | both the builtin webserver (started by :hg:`serve`) and the script you |
|
1544 | both the builtin webserver (started by :hg:`serve`) and the script you | |
1542 | run through a webserver (``hgweb.cgi`` and the derivatives for FastCGI |
|
1545 | run through a webserver (``hgweb.cgi`` and the derivatives for FastCGI | |
1543 | and WSGI). |
|
1546 | and WSGI). | |
1544 |
|
1547 | |||
1545 | The Mercurial webserver does no authentication (it does not prompt for |
|
1548 | The Mercurial webserver does no authentication (it does not prompt for | |
1546 | usernames and passwords to validate *who* users are), but it does do |
|
1549 | usernames and passwords to validate *who* users are), but it does do | |
1547 | authorization (it grants or denies access for *authenticated users* |
|
1550 | authorization (it grants or denies access for *authenticated users* | |
1548 | based on settings in this section). You must either configure your |
|
1551 | based on settings in this section). You must either configure your | |
1549 | webserver to do authentication for you, or disable the authorization |
|
1552 | webserver to do authentication for you, or disable the authorization | |
1550 | checks. |
|
1553 | checks. | |
1551 |
|
1554 | |||
1552 | For a quick setup in a trusted environment, e.g., a private LAN, where |
|
1555 | For a quick setup in a trusted environment, e.g., a private LAN, where | |
1553 | you want it to accept pushes from anybody, you can use the following |
|
1556 | you want it to accept pushes from anybody, you can use the following | |
1554 | command line:: |
|
1557 | command line:: | |
1555 |
|
1558 | |||
1556 | $ hg --config web.allow_push=* --config web.push_ssl=False serve |
|
1559 | $ hg --config web.allow_push=* --config web.push_ssl=False serve | |
1557 |
|
1560 | |||
1558 | Note that this will allow anybody to push anything to the server and |
|
1561 | Note that this will allow anybody to push anything to the server and | |
1559 | that this should not be used for public servers. |
|
1562 | that this should not be used for public servers. | |
1560 |
|
1563 | |||
1561 | The full set of options is: |
|
1564 | The full set of options is: | |
1562 |
|
1565 | |||
1563 | ``accesslog`` |
|
1566 | ``accesslog`` | |
1564 | Where to output the access log. Default is stdout. |
|
1567 | Where to output the access log. Default is stdout. | |
1565 |
|
1568 | |||
1566 | ``address`` |
|
1569 | ``address`` | |
1567 | Interface address to bind to. Default is all. |
|
1570 | Interface address to bind to. Default is all. | |
1568 |
|
1571 | |||
1569 | ``allow_archive`` |
|
1572 | ``allow_archive`` | |
1570 | List of archive format (bz2, gz, zip) allowed for downloading. |
|
1573 | List of archive format (bz2, gz, zip) allowed for downloading. | |
1571 | Default is empty. |
|
1574 | Default is empty. | |
1572 |
|
1575 | |||
1573 | ``allowbz2`` |
|
1576 | ``allowbz2`` | |
1574 | (DEPRECATED) Whether to allow .tar.bz2 downloading of repository |
|
1577 | (DEPRECATED) Whether to allow .tar.bz2 downloading of repository | |
1575 | revisions. |
|
1578 | revisions. | |
1576 | Default is False. |
|
1579 | Default is False. | |
1577 |
|
1580 | |||
1578 | ``allowgz`` |
|
1581 | ``allowgz`` | |
1579 | (DEPRECATED) Whether to allow .tar.gz downloading of repository |
|
1582 | (DEPRECATED) Whether to allow .tar.gz downloading of repository | |
1580 | revisions. |
|
1583 | revisions. | |
1581 | Default is False. |
|
1584 | Default is False. | |
1582 |
|
1585 | |||
1583 | ``allowpull`` |
|
1586 | ``allowpull`` | |
1584 | Whether to allow pulling from the repository. Default is True. |
|
1587 | Whether to allow pulling from the repository. Default is True. | |
1585 |
|
1588 | |||
1586 | ``allow_push`` |
|
1589 | ``allow_push`` | |
1587 | Whether to allow pushing to the repository. If empty or not set, |
|
1590 | Whether to allow pushing to the repository. If empty or not set, | |
1588 | push is not allowed. If the special value ``*``, any remote user can |
|
1591 | push is not allowed. If the special value ``*``, any remote user can | |
1589 | push, including unauthenticated users. Otherwise, the remote user |
|
1592 | push, including unauthenticated users. Otherwise, the remote user | |
1590 | must have been authenticated, and the authenticated user name must |
|
1593 | must have been authenticated, and the authenticated user name must | |
1591 | be present in this list. The contents of the allow_push list are |
|
1594 | be present in this list. The contents of the allow_push list are | |
1592 | examined after the deny_push list. |
|
1595 | examined after the deny_push list. | |
1593 |
|
1596 | |||
1594 | ``allow_read`` |
|
1597 | ``allow_read`` | |
1595 | If the user has not already been denied repository access due to |
|
1598 | If the user has not already been denied repository access due to | |
1596 | the contents of deny_read, this list determines whether to grant |
|
1599 | the contents of deny_read, this list determines whether to grant | |
1597 | repository access to the user. If this list is not empty, and the |
|
1600 | repository access to the user. If this list is not empty, and the | |
1598 | user is unauthenticated or not present in the list, then access is |
|
1601 | user is unauthenticated or not present in the list, then access is | |
1599 | denied for the user. If the list is empty or not set, then access |
|
1602 | denied for the user. If the list is empty or not set, then access | |
1600 | is permitted to all users by default. Setting allow_read to the |
|
1603 | is permitted to all users by default. Setting allow_read to the | |
1601 | special value ``*`` is equivalent to it not being set (i.e. access |
|
1604 | special value ``*`` is equivalent to it not being set (i.e. access | |
1602 | is permitted to all users). The contents of the allow_read list are |
|
1605 | is permitted to all users). The contents of the allow_read list are | |
1603 | examined after the deny_read list. |
|
1606 | examined after the deny_read list. | |
1604 |
|
1607 | |||
1605 | ``allowzip`` |
|
1608 | ``allowzip`` | |
1606 | (DEPRECATED) Whether to allow .zip downloading of repository |
|
1609 | (DEPRECATED) Whether to allow .zip downloading of repository | |
1607 | revisions. Default is False. This feature creates temporary files. |
|
1610 | revisions. Default is False. This feature creates temporary files. | |
1608 |
|
1611 | |||
1609 | ``archivesubrepos`` |
|
1612 | ``archivesubrepos`` | |
1610 | Whether to recurse into subrepositories when archiving. Default is |
|
1613 | Whether to recurse into subrepositories when archiving. Default is | |
1611 | False. |
|
1614 | False. | |
1612 |
|
1615 | |||
1613 | ``baseurl`` |
|
1616 | ``baseurl`` | |
1614 | Base URL to use when publishing URLs in other locations, so |
|
1617 | Base URL to use when publishing URLs in other locations, so | |
1615 | third-party tools like email notification hooks can construct |
|
1618 | third-party tools like email notification hooks can construct | |
1616 | URLs. Example: ``http://hgserver/repos/``. |
|
1619 | URLs. Example: ``http://hgserver/repos/``. | |
1617 |
|
1620 | |||
1618 | ``cacerts`` |
|
1621 | ``cacerts`` | |
1619 | Path to file containing a list of PEM encoded certificate |
|
1622 | Path to file containing a list of PEM encoded certificate | |
1620 | authority certificates. Environment variables and ``~user`` |
|
1623 | authority certificates. Environment variables and ``~user`` | |
1621 | constructs are expanded in the filename. If specified on the |
|
1624 | constructs are expanded in the filename. If specified on the | |
1622 | client, then it will verify the identity of remote HTTPS servers |
|
1625 | client, then it will verify the identity of remote HTTPS servers | |
1623 | with these certificates. |
|
1626 | with these certificates. | |
1624 |
|
1627 | |||
1625 | This feature is only supported when using Python 2.6 or later. If you wish |
|
1628 | This feature is only supported when using Python 2.6 or later. If you wish | |
1626 | to use it with earlier versions of Python, install the backported |
|
1629 | to use it with earlier versions of Python, install the backported | |
1627 | version of the ssl library that is available from |
|
1630 | version of the ssl library that is available from | |
1628 | ``http://pypi.python.org``. |
|
1631 | ``http://pypi.python.org``. | |
1629 |
|
1632 | |||
1630 | To disable SSL verification temporarily, specify ``--insecure`` from |
|
1633 | To disable SSL verification temporarily, specify ``--insecure`` from | |
1631 | command line. |
|
1634 | command line. | |
1632 |
|
1635 | |||
1633 | You can use OpenSSL's CA certificate file if your platform has |
|
1636 | You can use OpenSSL's CA certificate file if your platform has | |
1634 | one. On most Linux systems this will be |
|
1637 | one. On most Linux systems this will be | |
1635 | ``/etc/ssl/certs/ca-certificates.crt``. Otherwise you will have to |
|
1638 | ``/etc/ssl/certs/ca-certificates.crt``. Otherwise you will have to | |
1636 | generate this file manually. The form must be as follows:: |
|
1639 | generate this file manually. The form must be as follows:: | |
1637 |
|
1640 | |||
1638 | -----BEGIN CERTIFICATE----- |
|
1641 | -----BEGIN CERTIFICATE----- | |
1639 | ... (certificate in base64 PEM encoding) ... |
|
1642 | ... (certificate in base64 PEM encoding) ... | |
1640 | -----END CERTIFICATE----- |
|
1643 | -----END CERTIFICATE----- | |
1641 | -----BEGIN CERTIFICATE----- |
|
1644 | -----BEGIN CERTIFICATE----- | |
1642 | ... (certificate in base64 PEM encoding) ... |
|
1645 | ... (certificate in base64 PEM encoding) ... | |
1643 | -----END CERTIFICATE----- |
|
1646 | -----END CERTIFICATE----- | |
1644 |
|
1647 | |||
1645 | ``cache`` |
|
1648 | ``cache`` | |
1646 | Whether to support caching in hgweb. Defaults to True. |
|
1649 | Whether to support caching in hgweb. Defaults to True. | |
1647 |
|
1650 | |||
1648 | ``certificate`` |
|
1651 | ``certificate`` | |
1649 | Certificate to use when running :hg:`serve`. |
|
1652 | Certificate to use when running :hg:`serve`. | |
1650 |
|
1653 | |||
1651 | ``collapse`` |
|
1654 | ``collapse`` | |
1652 | With ``descend`` enabled, repositories in subdirectories are shown at |
|
1655 | With ``descend`` enabled, repositories in subdirectories are shown at | |
1653 | a single level alongside repositories in the current path. With |
|
1656 | a single level alongside repositories in the current path. With | |
1654 | ``collapse`` also enabled, repositories residing at a deeper level than |
|
1657 | ``collapse`` also enabled, repositories residing at a deeper level than | |
1655 | the current path are grouped behind navigable directory entries that |
|
1658 | the current path are grouped behind navigable directory entries that | |
1656 | lead to the locations of these repositories. In effect, this setting |
|
1659 | lead to the locations of these repositories. In effect, this setting | |
1657 | collapses each collection of repositories found within a subdirectory |
|
1660 | collapses each collection of repositories found within a subdirectory | |
1658 | into a single entry for that subdirectory. Default is False. |
|
1661 | into a single entry for that subdirectory. Default is False. | |
1659 |
|
1662 | |||
1660 | ``comparisoncontext`` |
|
1663 | ``comparisoncontext`` | |
1661 | Number of lines of context to show in side-by-side file comparison. If |
|
1664 | Number of lines of context to show in side-by-side file comparison. If | |
1662 | negative or the value ``full``, whole files are shown. Default is 5. |
|
1665 | negative or the value ``full``, whole files are shown. Default is 5. | |
1663 | This setting can be overridden by a ``context`` request parameter to the |
|
1666 | This setting can be overridden by a ``context`` request parameter to the | |
1664 | ``comparison`` command, taking the same values. |
|
1667 | ``comparison`` command, taking the same values. | |
1665 |
|
1668 | |||
1666 | ``contact`` |
|
1669 | ``contact`` | |
1667 | Name or email address of the person in charge of the repository. |
|
1670 | Name or email address of the person in charge of the repository. | |
1668 | Defaults to ui.username or ``$EMAIL`` or "unknown" if unset or empty. |
|
1671 | Defaults to ui.username or ``$EMAIL`` or "unknown" if unset or empty. | |
1669 |
|
1672 | |||
1670 | ``deny_push`` |
|
1673 | ``deny_push`` | |
1671 | Whether to deny pushing to the repository. If empty or not set, |
|
1674 | Whether to deny pushing to the repository. If empty or not set, | |
1672 | push is not denied. If the special value ``*``, all remote users are |
|
1675 | push is not denied. If the special value ``*``, all remote users are | |
1673 | denied push. Otherwise, unauthenticated users are all denied, and |
|
1676 | denied push. Otherwise, unauthenticated users are all denied, and | |
1674 | any authenticated user name present in this list is also denied. The |
|
1677 | any authenticated user name present in this list is also denied. The | |
1675 | contents of the deny_push list are examined before the allow_push list. |
|
1678 | contents of the deny_push list are examined before the allow_push list. | |
1676 |
|
1679 | |||
1677 | ``deny_read`` |
|
1680 | ``deny_read`` | |
1678 | Whether to deny reading/viewing of the repository. If this list is |
|
1681 | Whether to deny reading/viewing of the repository. If this list is | |
1679 | not empty, unauthenticated users are all denied, and any |
|
1682 | not empty, unauthenticated users are all denied, and any | |
1680 | authenticated user name present in this list is also denied access to |
|
1683 | authenticated user name present in this list is also denied access to | |
1681 | the repository. If set to the special value ``*``, all remote users |
|
1684 | the repository. If set to the special value ``*``, all remote users | |
1682 | are denied access (rarely needed ;). If deny_read is empty or not set, |
|
1685 | are denied access (rarely needed ;). If deny_read is empty or not set, | |
1683 | the determination of repository access depends on the presence and |
|
1686 | the determination of repository access depends on the presence and | |
1684 | content of the allow_read list (see description). If both |
|
1687 | content of the allow_read list (see description). If both | |
1685 | deny_read and allow_read are empty or not set, then access is |
|
1688 | deny_read and allow_read are empty or not set, then access is | |
1686 | permitted to all users by default. If the repository is being |
|
1689 | permitted to all users by default. If the repository is being | |
1687 | served via hgwebdir, denied users will not be able to see it in |
|
1690 | served via hgwebdir, denied users will not be able to see it in | |
1688 | the list of repositories. The contents of the deny_read list have |
|
1691 | the list of repositories. The contents of the deny_read list have | |
1689 | priority over (are examined before) the contents of the allow_read |
|
1692 | priority over (are examined before) the contents of the allow_read | |
1690 | list. |
|
1693 | list. | |
1691 |
|
1694 | |||
1692 | ``descend`` |
|
1695 | ``descend`` | |
1693 | hgwebdir indexes will not descend into subdirectories. Only repositories |
|
1696 | hgwebdir indexes will not descend into subdirectories. Only repositories | |
1694 | directly in the current path will be shown (other repositories are still |
|
1697 | directly in the current path will be shown (other repositories are still | |
1695 | available from the index corresponding to their containing path). |
|
1698 | available from the index corresponding to their containing path). | |
1696 |
|
1699 | |||
1697 | ``description`` |
|
1700 | ``description`` | |
1698 | Textual description of the repository's purpose or contents. |
|
1701 | Textual description of the repository's purpose or contents. | |
1699 | Default is "unknown". |
|
1702 | Default is "unknown". | |
1700 |
|
1703 | |||
1701 | ``encoding`` |
|
1704 | ``encoding`` | |
1702 | Character encoding name. Default is the current locale charset. |
|
1705 | Character encoding name. Default is the current locale charset. | |
1703 | Example: "UTF-8" |
|
1706 | Example: "UTF-8" | |
1704 |
|
1707 | |||
1705 | ``errorlog`` |
|
1708 | ``errorlog`` | |
1706 | Where to output the error log. Default is stderr. |
|
1709 | Where to output the error log. Default is stderr. | |
1707 |
|
1710 | |||
1708 | ``guessmime`` |
|
1711 | ``guessmime`` | |
1709 | Control MIME types for raw download of file content. |
|
1712 | Control MIME types for raw download of file content. | |
1710 | Set to True to let hgweb guess the content type from the file |
|
1713 | Set to True to let hgweb guess the content type from the file | |
1711 | extension. This will serve HTML files as ``text/html`` and might |
|
1714 | extension. This will serve HTML files as ``text/html`` and might | |
1712 | allow cross-site scripting attacks when serving untrusted |
|
1715 | allow cross-site scripting attacks when serving untrusted | |
1713 | repositories. Default is False. |
|
1716 | repositories. Default is False. | |
1714 |
|
1717 | |||
1715 | ``hidden`` |
|
1718 | ``hidden`` | |
1716 | Whether to hide the repository in the hgwebdir index. |
|
1719 | Whether to hide the repository in the hgwebdir index. | |
1717 | Default is False. |
|
1720 | Default is False. | |
1718 |
|
1721 | |||
1719 | ``ipv6`` |
|
1722 | ``ipv6`` | |
1720 | Whether to use IPv6. Default is False. |
|
1723 | Whether to use IPv6. Default is False. | |
1721 |
|
1724 | |||
1722 | ``logoimg`` |
|
1725 | ``logoimg`` | |
1723 | File name of the logo image that some templates display on each page. |
|
1726 | File name of the logo image that some templates display on each page. | |
1724 | The file name is relative to ``staticurl``. That is, the full path to |
|
1727 | The file name is relative to ``staticurl``. That is, the full path to | |
1725 | the logo image is "staticurl/logoimg". |
|
1728 | the logo image is "staticurl/logoimg". | |
1726 | If unset, ``hglogo.png`` will be used. |
|
1729 | If unset, ``hglogo.png`` will be used. | |
1727 |
|
1730 | |||
1728 | ``logourl`` |
|
1731 | ``logourl`` | |
1729 | Base URL to use for logos. If unset, ``http://mercurial.selenic.com/`` |
|
1732 | Base URL to use for logos. If unset, ``http://mercurial.selenic.com/`` | |
1730 | will be used. |
|
1733 | will be used. | |
1731 |
|
1734 | |||
1732 | ``maxchanges`` |
|
1735 | ``maxchanges`` | |
1733 | Maximum number of changes to list on the changelog. Default is 10. |
|
1736 | Maximum number of changes to list on the changelog. Default is 10. | |
1734 |
|
1737 | |||
1735 | ``maxfiles`` |
|
1738 | ``maxfiles`` | |
1736 | Maximum number of files to list per changeset. Default is 10. |
|
1739 | Maximum number of files to list per changeset. Default is 10. | |
1737 |
|
1740 | |||
1738 | ``maxshortchanges`` |
|
1741 | ``maxshortchanges`` | |
1739 | Maximum number of changes to list on the shortlog, graph or filelog |
|
1742 | Maximum number of changes to list on the shortlog, graph or filelog | |
1740 | pages. Default is 60. |
|
1743 | pages. Default is 60. | |
1741 |
|
1744 | |||
1742 | ``name`` |
|
1745 | ``name`` | |
1743 | Repository name to use in the web interface. Default is current |
|
1746 | Repository name to use in the web interface. Default is current | |
1744 | working directory. |
|
1747 | working directory. | |
1745 |
|
1748 | |||
1746 | ``port`` |
|
1749 | ``port`` | |
1747 | Port to listen on. Default is 8000. |
|
1750 | Port to listen on. Default is 8000. | |
1748 |
|
1751 | |||
1749 | ``prefix`` |
|
1752 | ``prefix`` | |
1750 | Prefix path to serve from. Default is '' (server root). |
|
1753 | Prefix path to serve from. Default is '' (server root). | |
1751 |
|
1754 | |||
1752 | ``push_ssl`` |
|
1755 | ``push_ssl`` | |
1753 | Whether to require that inbound pushes be transported over SSL to |
|
1756 | Whether to require that inbound pushes be transported over SSL to | |
1754 | prevent password sniffing. Default is True. |
|
1757 | prevent password sniffing. Default is True. | |
1755 |
|
1758 | |||
1756 | ``refreshinterval`` |
|
1759 | ``refreshinterval`` | |
1757 | How frequently directory listings re-scan the filesystem for new |
|
1760 | How frequently directory listings re-scan the filesystem for new | |
1758 | repositories, in seconds. This is relevant when wildcards are used |
|
1761 | repositories, in seconds. This is relevant when wildcards are used | |
1759 | to define paths. Depending on how much filesystem traversal is |
|
1762 | to define paths. Depending on how much filesystem traversal is | |
1760 | required, refreshing may negatively impact performance. |
|
1763 | required, refreshing may negatively impact performance. | |
1761 |
|
1764 | |||
1762 | Default is 20. Values less than or equal to 0 always refresh. |
|
1765 | Default is 20. Values less than or equal to 0 always refresh. | |
1763 |
|
1766 | |||
1764 | ``staticurl`` |
|
1767 | ``staticurl`` | |
1765 | Base URL to use for static files. If unset, static files (e.g. the |
|
1768 | Base URL to use for static files. If unset, static files (e.g. the | |
1766 | hgicon.png favicon) will be served by the CGI script itself. Use |
|
1769 | hgicon.png favicon) will be served by the CGI script itself. Use | |
1767 | this setting to serve them directly with the HTTP server. |
|
1770 | this setting to serve them directly with the HTTP server. | |
1768 | Example: ``http://hgserver/static/``. |
|
1771 | Example: ``http://hgserver/static/``. | |
1769 |
|
1772 | |||
1770 | ``stripes`` |
|
1773 | ``stripes`` | |
1771 | How many lines a "zebra stripe" should span in multi-line output. |
|
1774 | How many lines a "zebra stripe" should span in multi-line output. | |
1772 | Default is 1; set to 0 to disable. |
|
1775 | Default is 1; set to 0 to disable. | |
1773 |
|
1776 | |||
1774 | ``style`` |
|
1777 | ``style`` | |
1775 | Which template map style to use. The available options are the names of |
|
1778 | Which template map style to use. The available options are the names of | |
1776 | subdirectories in the HTML templates path. Default is ``paper``. |
|
1779 | subdirectories in the HTML templates path. Default is ``paper``. | |
1777 | Example: ``monoblue`` |
|
1780 | Example: ``monoblue`` | |
1778 |
|
1781 | |||
1779 | ``templates`` |
|
1782 | ``templates`` | |
1780 | Where to find the HTML templates. The default path to the HTML templates |
|
1783 | Where to find the HTML templates. The default path to the HTML templates | |
1781 | can be obtained from ``hg debuginstall``. |
|
1784 | can be obtained from ``hg debuginstall``. | |
1782 |
|
1785 | |||
1783 | ``websub`` |
|
1786 | ``websub`` | |
1784 | ---------- |
|
1787 | ---------- | |
1785 |
|
1788 | |||
1786 | Web substitution filter definition. You can use this section to |
|
1789 | Web substitution filter definition. You can use this section to | |
1787 | define a set of regular expression substitution patterns which |
|
1790 | define a set of regular expression substitution patterns which | |
1788 | let you automatically modify the hgweb server output. |
|
1791 | let you automatically modify the hgweb server output. | |
1789 |
|
1792 | |||
1790 | The default hgweb templates only apply these substitution patterns |
|
1793 | The default hgweb templates only apply these substitution patterns | |
1791 | on the revision description fields. You can apply them anywhere |
|
1794 | on the revision description fields. You can apply them anywhere | |
1792 | you want when you create your own templates by adding calls to the |
|
1795 | you want when you create your own templates by adding calls to the | |
1793 | "websub" filter (usually after calling the "escape" filter). |
|
1796 | "websub" filter (usually after calling the "escape" filter). | |
1794 |
|
1797 | |||
1795 | This can be used, for example, to convert issue references to links |
|
1798 | This can be used, for example, to convert issue references to links | |
1796 | to your issue tracker, or to convert "markdown-like" syntax into |
|
1799 | to your issue tracker, or to convert "markdown-like" syntax into | |
1797 | HTML (see the examples below). |
|
1800 | HTML (see the examples below). | |
1798 |
|
1801 | |||
1799 | Each entry in this section names a substitution filter. |
|
1802 | Each entry in this section names a substitution filter. | |
1800 | The value of each entry defines the substitution expression itself. |
|
1803 | The value of each entry defines the substitution expression itself. | |
1801 | The websub expressions follow the old interhg extension syntax, |
|
1804 | The websub expressions follow the old interhg extension syntax, | |
1802 | which in turn imitates the Unix sed replacement syntax:: |
|
1805 | which in turn imitates the Unix sed replacement syntax:: | |
1803 |
|
1806 | |||
1804 | patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i] |
|
1807 | patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i] | |
1805 |
|
1808 | |||
1806 | You can use any separator other than "/". The final "i" is optional |
|
1809 | You can use any separator other than "/". The final "i" is optional | |
1807 | and indicates that the search must be case insensitive. |
|
1810 | and indicates that the search must be case insensitive. | |
1808 |
|
1811 | |||
1809 | Examples:: |
|
1812 | Examples:: | |
1810 |
|
1813 | |||
1811 | [websub] |
|
1814 | [websub] | |
1812 | issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i |
|
1815 | issues = s|issue(\d+)|<a href="http://bts.example.org/issue\1">issue\1</a>|i | |
1813 | italic = s/\b_(\S+)_\b/<i>\1<\/i>/ |
|
1816 | italic = s/\b_(\S+)_\b/<i>\1<\/i>/ | |
1814 | bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/ |
|
1817 | bold = s/\*\b(\S+)\b\*/<b>\1<\/b>/ | |
1815 |
|
1818 | |||
1816 | ``worker`` |
|
1819 | ``worker`` | |
1817 | ---------- |
|
1820 | ---------- | |
1818 |
|
1821 | |||
1819 | Parallel master/worker configuration. We currently perform working |
|
1822 | Parallel master/worker configuration. We currently perform working | |
1820 | directory updates in parallel on Unix-like systems, which greatly |
|
1823 | directory updates in parallel on Unix-like systems, which greatly | |
1821 | helps performance. |
|
1824 | helps performance. | |
1822 |
|
1825 | |||
1823 | ``numcpus`` |
|
1826 | ``numcpus`` | |
1824 | Number of CPUs to use for parallel operations. Default is 4 or the |
|
1827 | Number of CPUs to use for parallel operations. Default is 4 or the | |
1825 | number of CPUs on the system, whichever is larger. A zero or |
|
1828 | number of CPUs on the system, whichever is larger. A zero or | |
1826 | negative value is treated as ``use the default``. |
|
1829 | negative value is treated as ``use the default``. |
General Comments 0
You need to be logged in to leave comments.
Login now