Show More
@@ -1,493 +1,508 b'' | |||||
1 | HGRC(5) |
|
1 | HGRC(5) | |
2 | ======= |
|
2 | ======= | |
3 | Bryan O'Sullivan <bos@serpentine.com> |
|
3 | Bryan O'Sullivan <bos@serpentine.com> | |
4 |
|
4 | |||
5 | NAME |
|
5 | NAME | |
6 | ---- |
|
6 | ---- | |
7 | hgrc - configuration files for Mercurial |
|
7 | hgrc - configuration files for Mercurial | |
8 |
|
8 | |||
9 | SYNOPSIS |
|
9 | SYNOPSIS | |
10 | -------- |
|
10 | -------- | |
11 |
|
11 | |||
12 | The Mercurial system uses a set of configuration files to control |
|
12 | The Mercurial system uses a set of configuration files to control | |
13 | aspects of its behaviour. |
|
13 | aspects of its behaviour. | |
14 |
|
14 | |||
15 | FILES |
|
15 | FILES | |
16 | ----- |
|
16 | ----- | |
17 |
|
17 | |||
18 | Mercurial reads configuration data from several files, if they exist. |
|
18 | Mercurial reads configuration data from several files, if they exist. | |
19 | The names of these files depend on the system on which Mercurial is |
|
19 | The names of these files depend on the system on which Mercurial is | |
20 | installed. |
|
20 | installed. | |
21 |
|
21 | |||
22 | (Unix) <install-root>/etc/mercurial/hgrc.d/*.rc:: |
|
22 | (Unix) <install-root>/etc/mercurial/hgrc.d/*.rc:: | |
23 | (Unix) <install-root>/etc/mercurial/hgrc:: |
|
23 | (Unix) <install-root>/etc/mercurial/hgrc:: | |
24 | Per-installation configuration files, searched for in the |
|
24 | Per-installation configuration files, searched for in the | |
25 | directory where Mercurial is installed. For example, if installed |
|
25 | directory where Mercurial is installed. For example, if installed | |
26 | in /shared/tools, Mercurial will look in |
|
26 | in /shared/tools, Mercurial will look in | |
27 | /shared/tools/etc/mercurial/hgrc. Options in these files apply to |
|
27 | /shared/tools/etc/mercurial/hgrc. Options in these files apply to | |
28 | all Mercurial commands executed by any user in any directory. |
|
28 | all Mercurial commands executed by any user in any directory. | |
29 |
|
29 | |||
30 | (Unix) /etc/mercurial/hgrc.d/*.rc:: |
|
30 | (Unix) /etc/mercurial/hgrc.d/*.rc:: | |
31 | (Unix) /etc/mercurial/hgrc:: |
|
31 | (Unix) /etc/mercurial/hgrc:: | |
32 | (Windows) C:\Mercurial\Mercurial.ini:: |
|
32 | (Windows) C:\Mercurial\Mercurial.ini:: | |
33 | Per-system configuration files, for the system on which Mercurial |
|
33 | Per-system configuration files, for the system on which Mercurial | |
34 | is running. Options in these files apply to all Mercurial |
|
34 | is running. Options in these files apply to all Mercurial | |
35 | commands executed by any user in any directory. Options in these |
|
35 | commands executed by any user in any directory. Options in these | |
36 | files override per-installation options. |
|
36 | files override per-installation options. | |
37 |
|
37 | |||
38 | (Unix) $HOME/.hgrc:: |
|
38 | (Unix) $HOME/.hgrc:: | |
39 | (Windows) C:\Documents and Settings\USERNAME\Mercurial.ini:: |
|
39 | (Windows) C:\Documents and Settings\USERNAME\Mercurial.ini:: | |
40 | (Windows) $HOME\Mercurial.ini:: |
|
40 | (Windows) $HOME\Mercurial.ini:: | |
41 | Per-user configuration file, for the user running Mercurial. |
|
41 | Per-user configuration file, for the user running Mercurial. | |
42 | Options in this file apply to all Mercurial commands executed by |
|
42 | Options in this file apply to all Mercurial commands executed by | |
43 | any user in any directory. Options in this file override |
|
43 | any user in any directory. Options in this file override | |
44 | per-installation and per-system options. |
|
44 | per-installation and per-system options. | |
45 | On Windows system, one of these is chosen exclusively according |
|
45 | On Windows system, one of these is chosen exclusively according | |
46 | to definition of HOME environment variable. |
|
46 | to definition of HOME environment variable. | |
47 |
|
47 | |||
48 | (Unix, Windows) <repo>/.hg/hgrc:: |
|
48 | (Unix, Windows) <repo>/.hg/hgrc:: | |
49 | Per-repository configuration options that only apply in a |
|
49 | Per-repository configuration options that only apply in a | |
50 | particular repository. This file is not version-controlled, and |
|
50 | particular repository. This file is not version-controlled, and | |
51 | will not get transferred during a "clone" operation. Options in |
|
51 | will not get transferred during a "clone" operation. Options in | |
52 | this file override options in all other configuration files. |
|
52 | this file override options in all other configuration files. | |
53 | On Unix, this file is only read if it belongs to a trusted user |
|
53 | On Unix, this file is only read if it belongs to a trusted user | |
54 | or to a trusted group. |
|
54 | or to a trusted group. | |
55 |
|
55 | |||
56 | SYNTAX |
|
56 | SYNTAX | |
57 | ------ |
|
57 | ------ | |
58 |
|
58 | |||
59 | A configuration file consists of sections, led by a "[section]" header |
|
59 | A configuration file consists of sections, led by a "[section]" header | |
60 | and followed by "name: value" entries; "name=value" is also accepted. |
|
60 | and followed by "name: value" entries; "name=value" is also accepted. | |
61 |
|
61 | |||
62 | [spam] |
|
62 | [spam] | |
63 | eggs=ham |
|
63 | eggs=ham | |
64 | green= |
|
64 | green= | |
65 | eggs |
|
65 | eggs | |
66 |
|
66 | |||
67 | Each line contains one entry. If the lines that follow are indented, |
|
67 | Each line contains one entry. If the lines that follow are indented, | |
68 | they are treated as continuations of that entry. |
|
68 | they are treated as continuations of that entry. | |
69 |
|
69 | |||
70 | Leading whitespace is removed from values. Empty lines are skipped. |
|
70 | Leading whitespace is removed from values. Empty lines are skipped. | |
71 |
|
71 | |||
72 | The optional values can contain format strings which refer to other |
|
72 | The optional values can contain format strings which refer to other | |
73 | values in the same section, or values in a special DEFAULT section. |
|
73 | values in the same section, or values in a special DEFAULT section. | |
74 |
|
74 | |||
75 | Lines beginning with "#" or ";" are ignored and may be used to provide |
|
75 | Lines beginning with "#" or ";" are ignored and may be used to provide | |
76 | comments. |
|
76 | comments. | |
77 |
|
77 | |||
78 | SECTIONS |
|
78 | SECTIONS | |
79 | -------- |
|
79 | -------- | |
80 |
|
80 | |||
81 | This section describes the different sections that may appear in a |
|
81 | This section describes the different sections that may appear in a | |
82 | Mercurial "hgrc" file, the purpose of each section, its possible |
|
82 | Mercurial "hgrc" file, the purpose of each section, its possible | |
83 | keys, and their possible values. |
|
83 | keys, and their possible values. | |
84 |
|
84 | |||
85 | decode/encode:: |
|
85 | decode/encode:: | |
86 | Filters for transforming files on checkout/checkin. This would |
|
86 | Filters for transforming files on checkout/checkin. This would | |
87 | typically be used for newline processing or other |
|
87 | typically be used for newline processing or other | |
88 | localization/canonicalization of files. |
|
88 | localization/canonicalization of files. | |
89 |
|
89 | |||
90 | Filters consist of a filter pattern followed by a filter command. |
|
90 | Filters consist of a filter pattern followed by a filter command. | |
91 | Filter patterns are globs by default, rooted at the repository |
|
91 | Filter patterns are globs by default, rooted at the repository | |
92 | root. For example, to match any file ending in ".txt" in the root |
|
92 | root. For example, to match any file ending in ".txt" in the root | |
93 | directory only, use the pattern "*.txt". To match any file ending |
|
93 | directory only, use the pattern "*.txt". To match any file ending | |
94 | in ".c" anywhere in the repository, use the pattern "**.c". |
|
94 | in ".c" anywhere in the repository, use the pattern "**.c". | |
95 |
|
95 | |||
96 | The filter command can start with a specifier, either "pipe:" or |
|
96 | The filter command can start with a specifier, either "pipe:" or | |
97 | "tempfile:". If no specifier is given, "pipe:" is used by default. |
|
97 | "tempfile:". If no specifier is given, "pipe:" is used by default. | |
98 |
|
98 | |||
99 | A "pipe:" command must accept data on stdin and return the |
|
99 | A "pipe:" command must accept data on stdin and return the | |
100 | transformed data on stdout. |
|
100 | transformed data on stdout. | |
101 |
|
101 | |||
102 | Pipe example: |
|
102 | Pipe example: | |
103 |
|
103 | |||
104 | [encode] |
|
104 | [encode] | |
105 | # uncompress gzip files on checkin to improve delta compression |
|
105 | # uncompress gzip files on checkin to improve delta compression | |
106 | # note: not necessarily a good idea, just an example |
|
106 | # note: not necessarily a good idea, just an example | |
107 | *.gz = pipe: gunzip |
|
107 | *.gz = pipe: gunzip | |
108 |
|
108 | |||
109 | [decode] |
|
109 | [decode] | |
110 | # recompress gzip files when writing them to the working dir (we |
|
110 | # recompress gzip files when writing them to the working dir (we | |
111 | # can safely omit "pipe:", because it's the default) |
|
111 | # can safely omit "pipe:", because it's the default) | |
112 | *.gz = gzip |
|
112 | *.gz = gzip | |
113 |
|
113 | |||
114 | A "tempfile:" command is a template. The string INFILE is replaced |
|
114 | A "tempfile:" command is a template. The string INFILE is replaced | |
115 | with the name of a temporary file that contains the data to be |
|
115 | with the name of a temporary file that contains the data to be | |
116 | filtered by the command. The string OUTFILE is replaced with the |
|
116 | filtered by the command. The string OUTFILE is replaced with the | |
117 | name of an empty temporary file, where the filtered data must be |
|
117 | name of an empty temporary file, where the filtered data must be | |
118 | written by the command. |
|
118 | written by the command. | |
119 |
|
119 | |||
120 | NOTE: the tempfile mechanism is recommended for Windows systems, |
|
120 | NOTE: the tempfile mechanism is recommended for Windows systems, | |
121 | where the standard shell I/O redirection operators often have |
|
121 | where the standard shell I/O redirection operators often have | |
122 | strange effects. In particular, if you are doing line ending |
|
122 | strange effects. In particular, if you are doing line ending | |
123 | conversion on Windows using the popular dos2unix and unix2dos |
|
123 | conversion on Windows using the popular dos2unix and unix2dos | |
124 | programs, you *must* use the tempfile mechanism, as using pipes will |
|
124 | programs, you *must* use the tempfile mechanism, as using pipes will | |
125 | corrupt the contents of your files. |
|
125 | corrupt the contents of your files. | |
126 |
|
126 | |||
127 | Tempfile example: |
|
127 | Tempfile example: | |
128 |
|
128 | |||
129 | [encode] |
|
129 | [encode] | |
130 | # convert files to unix line ending conventions on checkin |
|
130 | # convert files to unix line ending conventions on checkin | |
131 | **.txt = tempfile: dos2unix -n INFILE OUTFILE |
|
131 | **.txt = tempfile: dos2unix -n INFILE OUTFILE | |
132 |
|
132 | |||
133 | [decode] |
|
133 | [decode] | |
134 | # convert files to windows line ending conventions when writing |
|
134 | # convert files to windows line ending conventions when writing | |
135 | # them to the working dir |
|
135 | # them to the working dir | |
136 | **.txt = tempfile: unix2dos -n INFILE OUTFILE |
|
136 | **.txt = tempfile: unix2dos -n INFILE OUTFILE | |
137 |
|
137 | |||
|
138 | defaults:: | |||
|
139 | Use the [defaults] section to define command defaults, i.e. the | |||
|
140 | default options/arguments to pass to the specified commands. | |||
|
141 | ||||
|
142 | The following example makes 'hg log' run in verbose mode, and | |||
|
143 | 'hg status' show only the modified files, by default. | |||
|
144 | ||||
|
145 | [defaults] | |||
|
146 | log = -v | |||
|
147 | status = -m | |||
|
148 | ||||
|
149 | The actual commands, instead of their aliases, must be used when | |||
|
150 | defining command defaults. The command defaults will also be | |||
|
151 | applied to the aliases of the commands defined. | |||
|
152 | ||||
138 | email:: |
|
153 | email:: | |
139 | Settings for extensions that send email messages. |
|
154 | Settings for extensions that send email messages. | |
140 | from;; |
|
155 | from;; | |
141 | Optional. Email address to use in "From" header and SMTP envelope |
|
156 | Optional. Email address to use in "From" header and SMTP envelope | |
142 | of outgoing messages. |
|
157 | of outgoing messages. | |
143 | to;; |
|
158 | to;; | |
144 | Optional. Comma-separated list of recipients' email addresses. |
|
159 | Optional. Comma-separated list of recipients' email addresses. | |
145 | cc;; |
|
160 | cc;; | |
146 | Optional. Comma-separated list of carbon copy recipients' |
|
161 | Optional. Comma-separated list of carbon copy recipients' | |
147 | email addresses. |
|
162 | email addresses. | |
148 | bcc;; |
|
163 | bcc;; | |
149 | Optional. Comma-separated list of blind carbon copy |
|
164 | Optional. Comma-separated list of blind carbon copy | |
150 | recipients' email addresses. Cannot be set interactively. |
|
165 | recipients' email addresses. Cannot be set interactively. | |
151 | method;; |
|
166 | method;; | |
152 | Optional. Method to use to send email messages. If value is |
|
167 | Optional. Method to use to send email messages. If value is | |
153 | "smtp" (default), use SMTP (see section "[smtp]" for |
|
168 | "smtp" (default), use SMTP (see section "[smtp]" for | |
154 | configuration). Otherwise, use as name of program to run that |
|
169 | configuration). Otherwise, use as name of program to run that | |
155 | acts like sendmail (takes "-f" option for sender, list of |
|
170 | acts like sendmail (takes "-f" option for sender, list of | |
156 | recipients on command line, message on stdin). Normally, setting |
|
171 | recipients on command line, message on stdin). Normally, setting | |
157 | this to "sendmail" or "/usr/sbin/sendmail" is enough to use |
|
172 | this to "sendmail" or "/usr/sbin/sendmail" is enough to use | |
158 | sendmail to send messages. |
|
173 | sendmail to send messages. | |
159 |
|
174 | |||
160 | Email example: |
|
175 | Email example: | |
161 |
|
176 | |||
162 | [email] |
|
177 | [email] | |
163 | from = Joseph User <joe.user@example.com> |
|
178 | from = Joseph User <joe.user@example.com> | |
164 | method = /usr/sbin/sendmail |
|
179 | method = /usr/sbin/sendmail | |
165 |
|
180 | |||
166 | extensions:: |
|
181 | extensions:: | |
167 | Mercurial has an extension mechanism for adding new features. To |
|
182 | Mercurial has an extension mechanism for adding new features. To | |
168 | enable an extension, create an entry for it in this section. |
|
183 | enable an extension, create an entry for it in this section. | |
169 |
|
184 | |||
170 | If you know that the extension is already in Python's search path, |
|
185 | If you know that the extension is already in Python's search path, | |
171 | you can give the name of the module, followed by "=", with nothing |
|
186 | you can give the name of the module, followed by "=", with nothing | |
172 | after the "=". |
|
187 | after the "=". | |
173 |
|
188 | |||
174 | Otherwise, give a name that you choose, followed by "=", followed by |
|
189 | Otherwise, give a name that you choose, followed by "=", followed by | |
175 | the path to the ".py" file (including the file name extension) that |
|
190 | the path to the ".py" file (including the file name extension) that | |
176 | defines the extension. |
|
191 | defines the extension. | |
177 |
|
192 | |||
178 | Example for ~/.hgrc: |
|
193 | Example for ~/.hgrc: | |
179 |
|
194 | |||
180 | [extensions] |
|
195 | [extensions] | |
181 | # (the mq extension will get loaded from mercurial's path) |
|
196 | # (the mq extension will get loaded from mercurial's path) | |
182 | hgext.mq = |
|
197 | hgext.mq = | |
183 | # (this extension will get loaded from the file specified) |
|
198 | # (this extension will get loaded from the file specified) | |
184 | myfeature = ~/.hgext/myfeature.py |
|
199 | myfeature = ~/.hgext/myfeature.py | |
185 |
|
200 | |||
186 | hooks:: |
|
201 | hooks:: | |
187 | Commands or Python functions that get automatically executed by |
|
202 | Commands or Python functions that get automatically executed by | |
188 | various actions such as starting or finishing a commit. Multiple |
|
203 | various actions such as starting or finishing a commit. Multiple | |
189 | hooks can be run for the same action by appending a suffix to the |
|
204 | hooks can be run for the same action by appending a suffix to the | |
190 | action. Overriding a site-wide hook can be done by changing its |
|
205 | action. Overriding a site-wide hook can be done by changing its | |
191 | value or setting it to an empty string. |
|
206 | value or setting it to an empty string. | |
192 |
|
207 | |||
193 | Example .hg/hgrc: |
|
208 | Example .hg/hgrc: | |
194 |
|
209 | |||
195 | [hooks] |
|
210 | [hooks] | |
196 | # do not use the site-wide hook |
|
211 | # do not use the site-wide hook | |
197 | incoming = |
|
212 | incoming = | |
198 | incoming.email = /my/email/hook |
|
213 | incoming.email = /my/email/hook | |
199 | incoming.autobuild = /my/build/hook |
|
214 | incoming.autobuild = /my/build/hook | |
200 |
|
215 | |||
201 | Most hooks are run with environment variables set that give added |
|
216 | Most hooks are run with environment variables set that give added | |
202 | useful information. For each hook below, the environment variables |
|
217 | useful information. For each hook below, the environment variables | |
203 | it is passed are listed with names of the form "$HG_foo". |
|
218 | it is passed are listed with names of the form "$HG_foo". | |
204 |
|
219 | |||
205 | changegroup;; |
|
220 | changegroup;; | |
206 | Run after a changegroup has been added via push, pull or |
|
221 | Run after a changegroup has been added via push, pull or | |
207 | unbundle. ID of the first new changeset is in $HG_NODE. URL from |
|
222 | unbundle. ID of the first new changeset is in $HG_NODE. URL from | |
208 | which changes came is in $HG_URL. |
|
223 | which changes came is in $HG_URL. | |
209 | commit;; |
|
224 | commit;; | |
210 | Run after a changeset has been created in the local repository. |
|
225 | Run after a changeset has been created in the local repository. | |
211 | ID of the newly created changeset is in $HG_NODE. Parent |
|
226 | ID of the newly created changeset is in $HG_NODE. Parent | |
212 | changeset IDs are in $HG_PARENT1 and $HG_PARENT2. |
|
227 | changeset IDs are in $HG_PARENT1 and $HG_PARENT2. | |
213 | incoming;; |
|
228 | incoming;; | |
214 | Run after a changeset has been pulled, pushed, or unbundled into |
|
229 | Run after a changeset has been pulled, pushed, or unbundled into | |
215 | the local repository. The ID of the newly arrived changeset is in |
|
230 | the local repository. The ID of the newly arrived changeset is in | |
216 | $HG_NODE. URL that was source of changes came is in $HG_URL. |
|
231 | $HG_NODE. URL that was source of changes came is in $HG_URL. | |
217 | outgoing;; |
|
232 | outgoing;; | |
218 | Run after sending changes from local repository to another. ID of |
|
233 | Run after sending changes from local repository to another. ID of | |
219 | first changeset sent is in $HG_NODE. Source of operation is in |
|
234 | first changeset sent is in $HG_NODE. Source of operation is in | |
220 | $HG_SOURCE; see "preoutgoing" hook for description. |
|
235 | $HG_SOURCE; see "preoutgoing" hook for description. | |
221 | prechangegroup;; |
|
236 | prechangegroup;; | |
222 | Run before a changegroup is added via push, pull or unbundle. |
|
237 | Run before a changegroup is added via push, pull or unbundle. | |
223 | Exit status 0 allows the changegroup to proceed. Non-zero status |
|
238 | Exit status 0 allows the changegroup to proceed. Non-zero status | |
224 | will cause the push, pull or unbundle to fail. URL from which |
|
239 | will cause the push, pull or unbundle to fail. URL from which | |
225 | changes will come is in $HG_URL. |
|
240 | changes will come is in $HG_URL. | |
226 | precommit;; |
|
241 | precommit;; | |
227 | Run before starting a local commit. Exit status 0 allows the |
|
242 | Run before starting a local commit. Exit status 0 allows the | |
228 | commit to proceed. Non-zero status will cause the commit to fail. |
|
243 | commit to proceed. Non-zero status will cause the commit to fail. | |
229 | Parent changeset IDs are in $HG_PARENT1 and $HG_PARENT2. |
|
244 | Parent changeset IDs are in $HG_PARENT1 and $HG_PARENT2. | |
230 | preoutgoing;; |
|
245 | preoutgoing;; | |
231 | Run before computing changes to send from the local repository to |
|
246 | Run before computing changes to send from the local repository to | |
232 | another. Non-zero status will cause failure. This lets you |
|
247 | another. Non-zero status will cause failure. This lets you | |
233 | prevent pull over http or ssh. Also prevents against local pull, |
|
248 | prevent pull over http or ssh. Also prevents against local pull, | |
234 | push (outbound) or bundle commands, but not effective, since you |
|
249 | push (outbound) or bundle commands, but not effective, since you | |
235 | can just copy files instead then. Source of operation is in |
|
250 | can just copy files instead then. Source of operation is in | |
236 | $HG_SOURCE. If "serve", operation is happening on behalf of |
|
251 | $HG_SOURCE. If "serve", operation is happening on behalf of | |
237 | remote ssh or http repository. If "push", "pull" or "bundle", |
|
252 | remote ssh or http repository. If "push", "pull" or "bundle", | |
238 | operation is happening on behalf of repository on same system. |
|
253 | operation is happening on behalf of repository on same system. | |
239 | pretag;; |
|
254 | pretag;; | |
240 | Run before creating a tag. Exit status 0 allows the tag to be |
|
255 | Run before creating a tag. Exit status 0 allows the tag to be | |
241 | created. Non-zero status will cause the tag to fail. ID of |
|
256 | created. Non-zero status will cause the tag to fail. ID of | |
242 | changeset to tag is in $HG_NODE. Name of tag is in $HG_TAG. Tag |
|
257 | changeset to tag is in $HG_NODE. Name of tag is in $HG_TAG. Tag | |
243 | is local if $HG_LOCAL=1, in repo if $HG_LOCAL=0. |
|
258 | is local if $HG_LOCAL=1, in repo if $HG_LOCAL=0. | |
244 | pretxnchangegroup;; |
|
259 | pretxnchangegroup;; | |
245 | Run after a changegroup has been added via push, pull or unbundle, |
|
260 | Run after a changegroup has been added via push, pull or unbundle, | |
246 | but before the transaction has been committed. Changegroup is |
|
261 | but before the transaction has been committed. Changegroup is | |
247 | visible to hook program. This lets you validate incoming changes |
|
262 | visible to hook program. This lets you validate incoming changes | |
248 | before accepting them. Passed the ID of the first new changeset |
|
263 | before accepting them. Passed the ID of the first new changeset | |
249 | in $HG_NODE. Exit status 0 allows the transaction to commit. |
|
264 | in $HG_NODE. Exit status 0 allows the transaction to commit. | |
250 | Non-zero status will cause the transaction to be rolled back and |
|
265 | Non-zero status will cause the transaction to be rolled back and | |
251 | the push, pull or unbundle will fail. URL that was source of |
|
266 | the push, pull or unbundle will fail. URL that was source of | |
252 | changes is in $HG_URL. |
|
267 | changes is in $HG_URL. | |
253 | pretxncommit;; |
|
268 | pretxncommit;; | |
254 | Run after a changeset has been created but the transaction not yet |
|
269 | Run after a changeset has been created but the transaction not yet | |
255 | committed. Changeset is visible to hook program. This lets you |
|
270 | committed. Changeset is visible to hook program. This lets you | |
256 | validate commit message and changes. Exit status 0 allows the |
|
271 | validate commit message and changes. Exit status 0 allows the | |
257 | commit to proceed. Non-zero status will cause the transaction to |
|
272 | commit to proceed. Non-zero status will cause the transaction to | |
258 | be rolled back. ID of changeset is in $HG_NODE. Parent changeset |
|
273 | be rolled back. ID of changeset is in $HG_NODE. Parent changeset | |
259 | IDs are in $HG_PARENT1 and $HG_PARENT2. |
|
274 | IDs are in $HG_PARENT1 and $HG_PARENT2. | |
260 | preupdate;; |
|
275 | preupdate;; | |
261 | Run before updating the working directory. Exit status 0 allows |
|
276 | Run before updating the working directory. Exit status 0 allows | |
262 | the update to proceed. Non-zero status will prevent the update. |
|
277 | the update to proceed. Non-zero status will prevent the update. | |
263 | Changeset ID of first new parent is in $HG_PARENT1. If merge, ID |
|
278 | Changeset ID of first new parent is in $HG_PARENT1. If merge, ID | |
264 | of second new parent is in $HG_PARENT2. |
|
279 | of second new parent is in $HG_PARENT2. | |
265 | tag;; |
|
280 | tag;; | |
266 | Run after a tag is created. ID of tagged changeset is in |
|
281 | Run after a tag is created. ID of tagged changeset is in | |
267 | $HG_NODE. Name of tag is in $HG_TAG. Tag is local if |
|
282 | $HG_NODE. Name of tag is in $HG_TAG. Tag is local if | |
268 | $HG_LOCAL=1, in repo if $HG_LOCAL=0. |
|
283 | $HG_LOCAL=1, in repo if $HG_LOCAL=0. | |
269 | update;; |
|
284 | update;; | |
270 | Run after updating the working directory. Changeset ID of first |
|
285 | Run after updating the working directory. Changeset ID of first | |
271 | new parent is in $HG_PARENT1. If merge, ID of second new parent |
|
286 | new parent is in $HG_PARENT1. If merge, ID of second new parent | |
272 | is in $HG_PARENT2. If update succeeded, $HG_ERROR=0. If update |
|
287 | is in $HG_PARENT2. If update succeeded, $HG_ERROR=0. If update | |
273 | failed (e.g. because conflicts not resolved), $HG_ERROR=1. |
|
288 | failed (e.g. because conflicts not resolved), $HG_ERROR=1. | |
274 |
|
289 | |||
275 | Note: In earlier releases, the names of hook environment variables |
|
290 | Note: In earlier releases, the names of hook environment variables | |
276 | did not have a "HG_" prefix. The old unprefixed names are no longer |
|
291 | did not have a "HG_" prefix. The old unprefixed names are no longer | |
277 | provided in the environment. |
|
292 | provided in the environment. | |
278 |
|
293 | |||
279 | The syntax for Python hooks is as follows: |
|
294 | The syntax for Python hooks is as follows: | |
280 |
|
295 | |||
281 | hookname = python:modulename.submodule.callable |
|
296 | hookname = python:modulename.submodule.callable | |
282 |
|
297 | |||
283 | Python hooks are run within the Mercurial process. Each hook is |
|
298 | Python hooks are run within the Mercurial process. Each hook is | |
284 | called with at least three keyword arguments: a ui object (keyword |
|
299 | called with at least three keyword arguments: a ui object (keyword | |
285 | "ui"), a repository object (keyword "repo"), and a "hooktype" |
|
300 | "ui"), a repository object (keyword "repo"), and a "hooktype" | |
286 | keyword that tells what kind of hook is used. Arguments listed as |
|
301 | keyword that tells what kind of hook is used. Arguments listed as | |
287 | environment variables above are passed as keyword arguments, with no |
|
302 | environment variables above are passed as keyword arguments, with no | |
288 | "HG_" prefix, and names in lower case. |
|
303 | "HG_" prefix, and names in lower case. | |
289 |
|
304 | |||
290 | A Python hook must return a "true" value to succeed. Returning a |
|
305 | A Python hook must return a "true" value to succeed. Returning a | |
291 | "false" value or raising an exception is treated as failure of the |
|
306 | "false" value or raising an exception is treated as failure of the | |
292 | hook. |
|
307 | hook. | |
293 |
|
308 | |||
294 | http_proxy:: |
|
309 | http_proxy:: | |
295 | Used to access web-based Mercurial repositories through a HTTP |
|
310 | Used to access web-based Mercurial repositories through a HTTP | |
296 | proxy. |
|
311 | proxy. | |
297 | host;; |
|
312 | host;; | |
298 | Host name and (optional) port of the proxy server, for example |
|
313 | Host name and (optional) port of the proxy server, for example | |
299 | "myproxy:8000". |
|
314 | "myproxy:8000". | |
300 | no;; |
|
315 | no;; | |
301 | Optional. Comma-separated list of host names that should bypass |
|
316 | Optional. Comma-separated list of host names that should bypass | |
302 | the proxy. |
|
317 | the proxy. | |
303 | passwd;; |
|
318 | passwd;; | |
304 | Optional. Password to authenticate with at the proxy server. |
|
319 | Optional. Password to authenticate with at the proxy server. | |
305 | user;; |
|
320 | user;; | |
306 | Optional. User name to authenticate with at the proxy server. |
|
321 | Optional. User name to authenticate with at the proxy server. | |
307 |
|
322 | |||
308 | smtp:: |
|
323 | smtp:: | |
309 | Configuration for extensions that need to send email messages. |
|
324 | Configuration for extensions that need to send email messages. | |
310 | host;; |
|
325 | host;; | |
311 | Host name of mail server, e.g. "mail.example.com". |
|
326 | Host name of mail server, e.g. "mail.example.com". | |
312 | port;; |
|
327 | port;; | |
313 | Optional. Port to connect to on mail server. Default: 25. |
|
328 | Optional. Port to connect to on mail server. Default: 25. | |
314 | tls;; |
|
329 | tls;; | |
315 | Optional. Whether to connect to mail server using TLS. True or |
|
330 | Optional. Whether to connect to mail server using TLS. True or | |
316 | False. Default: False. |
|
331 | False. Default: False. | |
317 | username;; |
|
332 | username;; | |
318 | Optional. User name to authenticate to SMTP server with. |
|
333 | Optional. User name to authenticate to SMTP server with. | |
319 | If username is specified, password must also be specified. |
|
334 | If username is specified, password must also be specified. | |
320 | Default: none. |
|
335 | Default: none. | |
321 | password;; |
|
336 | password;; | |
322 | Optional. Password to authenticate to SMTP server with. |
|
337 | Optional. Password to authenticate to SMTP server with. | |
323 | If username is specified, password must also be specified. |
|
338 | If username is specified, password must also be specified. | |
324 | Default: none. |
|
339 | Default: none. | |
325 | local_hostname;; |
|
340 | local_hostname;; | |
326 | Optional. It's the hostname that the sender can use to identify itself |
|
341 | Optional. It's the hostname that the sender can use to identify itself | |
327 | to the MTA. |
|
342 | to the MTA. | |
328 |
|
343 | |||
329 | paths:: |
|
344 | paths:: | |
330 | Assigns symbolic names to repositories. The left side is the |
|
345 | Assigns symbolic names to repositories. The left side is the | |
331 | symbolic name, and the right gives the directory or URL that is the |
|
346 | symbolic name, and the right gives the directory or URL that is the | |
332 | location of the repository. Default paths can be declared by |
|
347 | location of the repository. Default paths can be declared by | |
333 | setting the following entries. |
|
348 | setting the following entries. | |
334 | default;; |
|
349 | default;; | |
335 | Directory or URL to use when pulling if no source is specified. |
|
350 | Directory or URL to use when pulling if no source is specified. | |
336 | Default is set to repository from which the current repository |
|
351 | Default is set to repository from which the current repository | |
337 | was cloned. |
|
352 | was cloned. | |
338 | default-push;; |
|
353 | default-push;; | |
339 | Optional. Directory or URL to use when pushing if no destination |
|
354 | Optional. Directory or URL to use when pushing if no destination | |
340 | is specified. |
|
355 | is specified. | |
341 |
|
356 | |||
342 | server:: |
|
357 | server:: | |
343 | Controls generic server settings. |
|
358 | Controls generic server settings. | |
344 | uncompressed;; |
|
359 | uncompressed;; | |
345 | Whether to allow clients to clone a repo using the uncompressed |
|
360 | Whether to allow clients to clone a repo using the uncompressed | |
346 | streaming protocol. This transfers about 40% more data than a |
|
361 | streaming protocol. This transfers about 40% more data than a | |
347 | regular clone, but uses less memory and CPU on both server and |
|
362 | regular clone, but uses less memory and CPU on both server and | |
348 | client. Over a LAN (100Mbps or better) or a very fast WAN, an |
|
363 | client. Over a LAN (100Mbps or better) or a very fast WAN, an | |
349 | uncompressed streaming clone is a lot faster (~10x) than a regular |
|
364 | uncompressed streaming clone is a lot faster (~10x) than a regular | |
350 | clone. Over most WAN connections (anything slower than about |
|
365 | clone. Over most WAN connections (anything slower than about | |
351 | 6Mbps), uncompressed streaming is slower, because of the extra |
|
366 | 6Mbps), uncompressed streaming is slower, because of the extra | |
352 | data transfer overhead. Default is False. |
|
367 | data transfer overhead. Default is False. | |
353 |
|
368 | |||
354 | trusted:: |
|
369 | trusted:: | |
355 | Mercurial will only read the .hg/hgrc file from a repository if |
|
370 | Mercurial will only read the .hg/hgrc file from a repository if | |
356 | it belongs to a trusted user or to a trusted group. This section |
|
371 | it belongs to a trusted user or to a trusted group. This section | |
357 | specifies what users and groups are trusted. To trust everybody, |
|
372 | specifies what users and groups are trusted. To trust everybody, | |
358 | list a user or a group with name "*". |
|
373 | list a user or a group with name "*". | |
359 | users;; |
|
374 | users;; | |
360 | Comma-separated list of trusted users. |
|
375 | Comma-separated list of trusted users. | |
361 | groups;; |
|
376 | groups;; | |
362 | Comma-separated list of trusted groups. |
|
377 | Comma-separated list of trusted groups. | |
363 |
|
378 | |||
364 | ui:: |
|
379 | ui:: | |
365 | User interface controls. |
|
380 | User interface controls. | |
366 | debug;; |
|
381 | debug;; | |
367 | Print debugging information. True or False. Default is False. |
|
382 | Print debugging information. True or False. Default is False. | |
368 | editor;; |
|
383 | editor;; | |
369 | The editor to use during a commit. Default is $EDITOR or "vi". |
|
384 | The editor to use during a commit. Default is $EDITOR or "vi". | |
370 | ignore;; |
|
385 | ignore;; | |
371 | A file to read per-user ignore patterns from. This file should be in |
|
386 | A file to read per-user ignore patterns from. This file should be in | |
372 | the same format as a repository-wide .hgignore file. This option |
|
387 | the same format as a repository-wide .hgignore file. This option | |
373 | supports hook syntax, so if you want to specify multiple ignore |
|
388 | supports hook syntax, so if you want to specify multiple ignore | |
374 | files, you can do so by setting something like |
|
389 | files, you can do so by setting something like | |
375 | "ignore.other = ~/.hgignore2". For details of the ignore file |
|
390 | "ignore.other = ~/.hgignore2". For details of the ignore file | |
376 | format, see the hgignore(5) man page. |
|
391 | format, see the hgignore(5) man page. | |
377 | interactive;; |
|
392 | interactive;; | |
378 | Allow to prompt the user. True or False. Default is True. |
|
393 | Allow to prompt the user. True or False. Default is True. | |
379 | logtemplate;; |
|
394 | logtemplate;; | |
380 | Template string for commands that print changesets. |
|
395 | Template string for commands that print changesets. | |
381 | style;; |
|
396 | style;; | |
382 | Name of style to use for command output. |
|
397 | Name of style to use for command output. | |
383 | merge;; |
|
398 | merge;; | |
384 | The conflict resolution program to use during a manual merge. |
|
399 | The conflict resolution program to use during a manual merge. | |
385 | Default is "hgmerge". |
|
400 | Default is "hgmerge". | |
386 | quiet;; |
|
401 | quiet;; | |
387 | Reduce the amount of output printed. True or False. Default is False. |
|
402 | Reduce the amount of output printed. True or False. Default is False. | |
388 | remotecmd;; |
|
403 | remotecmd;; | |
389 | remote command to use for clone/push/pull operations. Default is 'hg'. |
|
404 | remote command to use for clone/push/pull operations. Default is 'hg'. | |
390 | ssh;; |
|
405 | ssh;; | |
391 | command to use for SSH connections. Default is 'ssh'. |
|
406 | command to use for SSH connections. Default is 'ssh'. | |
392 | strict;; |
|
407 | strict;; | |
393 | Require exact command names, instead of allowing unambiguous |
|
408 | Require exact command names, instead of allowing unambiguous | |
394 | abbreviations. True or False. Default is False. |
|
409 | abbreviations. True or False. Default is False. | |
395 | timeout;; |
|
410 | timeout;; | |
396 | The timeout used when a lock is held (in seconds), a negative value |
|
411 | The timeout used when a lock is held (in seconds), a negative value | |
397 | means no timeout. Default is 600. |
|
412 | means no timeout. Default is 600. | |
398 | username;; |
|
413 | username;; | |
399 | The committer of a changeset created when running "commit". |
|
414 | The committer of a changeset created when running "commit". | |
400 | Typically a person's name and email address, e.g. "Fred Widget |
|
415 | Typically a person's name and email address, e.g. "Fred Widget | |
401 | <fred@example.com>". Default is $EMAIL or username@hostname, unless |
|
416 | <fred@example.com>". Default is $EMAIL or username@hostname, unless | |
402 | username is set to an empty string, which enforces specifying the |
|
417 | username is set to an empty string, which enforces specifying the | |
403 | username manually. |
|
418 | username manually. | |
404 | verbose;; |
|
419 | verbose;; | |
405 | Increase the amount of output printed. True or False. Default is False. |
|
420 | Increase the amount of output printed. True or False. Default is False. | |
406 |
|
421 | |||
407 |
|
422 | |||
408 | web:: |
|
423 | web:: | |
409 | Web interface configuration. |
|
424 | Web interface configuration. | |
410 | accesslog;; |
|
425 | accesslog;; | |
411 | Where to output the access log. Default is stdout. |
|
426 | Where to output the access log. Default is stdout. | |
412 | address;; |
|
427 | address;; | |
413 | Interface address to bind to. Default is all. |
|
428 | Interface address to bind to. Default is all. | |
414 | allow_archive;; |
|
429 | allow_archive;; | |
415 | List of archive format (bz2, gz, zip) allowed for downloading. |
|
430 | List of archive format (bz2, gz, zip) allowed for downloading. | |
416 | Default is empty. |
|
431 | Default is empty. | |
417 | allowbz2;; |
|
432 | allowbz2;; | |
418 | (DEPRECATED) Whether to allow .tar.bz2 downloading of repo revisions. |
|
433 | (DEPRECATED) Whether to allow .tar.bz2 downloading of repo revisions. | |
419 | Default is false. |
|
434 | Default is false. | |
420 | allowgz;; |
|
435 | allowgz;; | |
421 | (DEPRECATED) Whether to allow .tar.gz downloading of repo revisions. |
|
436 | (DEPRECATED) Whether to allow .tar.gz downloading of repo revisions. | |
422 | Default is false. |
|
437 | Default is false. | |
423 | allowpull;; |
|
438 | allowpull;; | |
424 | Whether to allow pulling from the repository. Default is true. |
|
439 | Whether to allow pulling from the repository. Default is true. | |
425 | allow_push;; |
|
440 | allow_push;; | |
426 | Whether to allow pushing to the repository. If empty or not set, |
|
441 | Whether to allow pushing to the repository. If empty or not set, | |
427 | push is not allowed. If the special value "*", any remote user |
|
442 | push is not allowed. If the special value "*", any remote user | |
428 | can push, including unauthenticated users. Otherwise, the remote |
|
443 | can push, including unauthenticated users. Otherwise, the remote | |
429 | user must have been authenticated, and the authenticated user name |
|
444 | user must have been authenticated, and the authenticated user name | |
430 | must be present in this list (separated by whitespace or ","). |
|
445 | must be present in this list (separated by whitespace or ","). | |
431 | The contents of the allow_push list are examined after the |
|
446 | The contents of the allow_push list are examined after the | |
432 | deny_push list. |
|
447 | deny_push list. | |
433 | allowzip;; |
|
448 | allowzip;; | |
434 | (DEPRECATED) Whether to allow .zip downloading of repo revisions. |
|
449 | (DEPRECATED) Whether to allow .zip downloading of repo revisions. | |
435 | Default is false. This feature creates temporary files. |
|
450 | Default is false. This feature creates temporary files. | |
436 | baseurl;; |
|
451 | baseurl;; | |
437 | Base URL to use when publishing URLs in other locations, so |
|
452 | Base URL to use when publishing URLs in other locations, so | |
438 | third-party tools like email notification hooks can construct URLs. |
|
453 | third-party tools like email notification hooks can construct URLs. | |
439 | Example: "http://hgserver/repos/" |
|
454 | Example: "http://hgserver/repos/" | |
440 | contact;; |
|
455 | contact;; | |
441 | Name or email address of the person in charge of the repository. |
|
456 | Name or email address of the person in charge of the repository. | |
442 | Default is "unknown". |
|
457 | Default is "unknown". | |
443 | deny_push;; |
|
458 | deny_push;; | |
444 | Whether to deny pushing to the repository. If empty or not set, |
|
459 | Whether to deny pushing to the repository. If empty or not set, | |
445 | push is not denied. If the special value "*", all remote users |
|
460 | push is not denied. If the special value "*", all remote users | |
446 | are denied push. Otherwise, unauthenticated users are all denied, |
|
461 | are denied push. Otherwise, unauthenticated users are all denied, | |
447 | and any authenticated user name present in this list (separated by |
|
462 | and any authenticated user name present in this list (separated by | |
448 | whitespace or ",") is also denied. The contents of the deny_push |
|
463 | whitespace or ",") is also denied. The contents of the deny_push | |
449 | list are examined before the allow_push list. |
|
464 | list are examined before the allow_push list. | |
450 | description;; |
|
465 | description;; | |
451 | Textual description of the repository's purpose or contents. |
|
466 | Textual description of the repository's purpose or contents. | |
452 | Default is "unknown". |
|
467 | Default is "unknown". | |
453 | errorlog;; |
|
468 | errorlog;; | |
454 | Where to output the error log. Default is stderr. |
|
469 | Where to output the error log. Default is stderr. | |
455 | ipv6;; |
|
470 | ipv6;; | |
456 | Whether to use IPv6. Default is false. |
|
471 | Whether to use IPv6. Default is false. | |
457 | name;; |
|
472 | name;; | |
458 | Repository name to use in the web interface. Default is current |
|
473 | Repository name to use in the web interface. Default is current | |
459 | working directory. |
|
474 | working directory. | |
460 | maxchanges;; |
|
475 | maxchanges;; | |
461 | Maximum number of changes to list on the changelog. Default is 10. |
|
476 | Maximum number of changes to list on the changelog. Default is 10. | |
462 | maxfiles;; |
|
477 | maxfiles;; | |
463 | Maximum number of files to list per changeset. Default is 10. |
|
478 | Maximum number of files to list per changeset. Default is 10. | |
464 | port;; |
|
479 | port;; | |
465 | Port to listen on. Default is 8000. |
|
480 | Port to listen on. Default is 8000. | |
466 | push_ssl;; |
|
481 | push_ssl;; | |
467 | Whether to require that inbound pushes be transported over SSL to |
|
482 | Whether to require that inbound pushes be transported over SSL to | |
468 | prevent password sniffing. Default is true. |
|
483 | prevent password sniffing. Default is true. | |
469 | stripes;; |
|
484 | stripes;; | |
470 | How many lines a "zebra stripe" should span in multiline output. |
|
485 | How many lines a "zebra stripe" should span in multiline output. | |
471 | Default is 1; set to 0 to disable. |
|
486 | Default is 1; set to 0 to disable. | |
472 | style;; |
|
487 | style;; | |
473 | Which template map style to use. |
|
488 | Which template map style to use. | |
474 | templates;; |
|
489 | templates;; | |
475 | Where to find the HTML templates. Default is install path. |
|
490 | Where to find the HTML templates. Default is install path. | |
476 |
|
491 | |||
477 |
|
492 | |||
478 | AUTHOR |
|
493 | AUTHOR | |
479 | ------ |
|
494 | ------ | |
480 | Bryan O'Sullivan <bos@serpentine.com>. |
|
495 | Bryan O'Sullivan <bos@serpentine.com>. | |
481 |
|
496 | |||
482 | Mercurial was written by Matt Mackall <mpm@selenic.com>. |
|
497 | Mercurial was written by Matt Mackall <mpm@selenic.com>. | |
483 |
|
498 | |||
484 | SEE ALSO |
|
499 | SEE ALSO | |
485 | -------- |
|
500 | -------- | |
486 | hg(1), hgignore(5) |
|
501 | hg(1), hgignore(5) | |
487 |
|
502 | |||
488 | COPYING |
|
503 | COPYING | |
489 | ------- |
|
504 | ------- | |
490 | This manual page is copyright 2005 Bryan O'Sullivan. |
|
505 | This manual page is copyright 2005 Bryan O'Sullivan. | |
491 | Mercurial is copyright 2005, 2006 Matt Mackall. |
|
506 | Mercurial is copyright 2005, 2006 Matt Mackall. | |
492 | Free use of this software is granted under the terms of the GNU General |
|
507 | Free use of this software is granted under the terms of the GNU General | |
493 | Public License (GPL). |
|
508 | Public License (GPL). |
General Comments 0
You need to be logged in to leave comments.
Login now