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