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