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