##// END OF EJS Templates
document hgignore syntax in new file doc/hgignore.5.txt....
Vadim Gelfer -
r2209:956e329f default
parent child Browse files
Show More
@@ -0,0 +1,92 b''
1 HGIGNORE(5)
2 ===========
3 Vadim Gelfer <vadim.gelfer@gmail.com>
4
5 NAME
6 ----
7 hgignore - syntax for Mercurial ignore files
8
9 SYNOPSIS
10 --------
11
12 The Mercurial system uses a file called .hgignore in the root
13 directory of a repository to control its behavior when it finds files
14 that it is not currently managing.
15
16 DESCRIPTION
17 -----------
18
19 Mercurial ignores every unmanaged file that matches any pattern in an
20 ignore file. The patterns in an ignore file do not apply to files
21 managed by Mercurial. To control Mercurial's handling of files that
22 it manages, see the hg(1) man page. Look for the "-I" and "-X"
23 options.
24
25 In addition, a Mercurial configuration file can point to a set of
26 per-user or global ignore files. See the hgrc(5) man page for details
27 of how to configure these files. Look for the "ignore" entry in the
28 "ui" section.
29
30 SYNTAX
31 ------
32
33 An ignore file is a plain text file consisting of a list of patterns,
34 with one pattern per line. Empty lines are skipped. The "#"
35 character is treated as a comment character, and the "\" character is
36 treated as an escape character.
37
38 Mercurial supports several pattern syntaxes. The default syntax used
39 is Python/Perl-style regular expressions.
40
41 To change the syntax used, use a line of the following form:
42
43 syntax: NAME
44
45 where NAME is one of the following:
46
47 regexp::
48 Regular expression, Python/Perl syntax.
49 glob::
50 Shell-style glob.
51
52 The chosen syntax stays in effect when parsing all patterns that
53 follow, until another syntax is selected.
54
55 Neither glob nor regexp patterns are rooted. A glob-syntax pattern of
56 the form "*.c" will match a file ending in ".c" in any directory, and
57 a regexp pattern of the form "\.c$" will do the same. To root a
58 regexp pattern, start it with "^".
59
60 EXAMPLE
61 -------
62
63 Here is an example ignore file.
64
65 # use glob syntax.
66 syntax: glob
67
68 *.elc
69 *.pyc
70 *~
71 .*.swp
72
73 # switch to regexp syntax.
74 syntax: regexp
75 ^\.pc/
76
77 AUTHOR
78 ------
79 Vadim Gelfer <vadim.gelfer@gmail.com>
80
81 Mercurial was written by Matt Mackall <mpm@selenic.com>.
82
83 SEE ALSO
84 --------
85 hg(1), hgrc(5)
86
87 COPYING
88 -------
89 This manual page is copyright 2006 Vadim Gelfer.
90 Mercurial is copyright 2005, 2006 Matt Mackall.
91 Free use of this software is granted under the terms of the GNU General
92 Public License (GPL).
@@ -1,221 +1,221 b''
1 HG(1)
1 HG(1)
2 =====
2 =====
3 Matt Mackall <mpm@selenic.com>
3 Matt Mackall <mpm@selenic.com>
4
4
5 NAME
5 NAME
6 ----
6 ----
7 hg - Mercurial source code management system
7 hg - Mercurial source code management system
8
8
9 SYNOPSIS
9 SYNOPSIS
10 --------
10 --------
11 'hg' [-v -d -q -y] <command> [command options] [files]
11 'hg' [-v -d -q -y] <command> [command options] [files]
12
12
13 DESCRIPTION
13 DESCRIPTION
14 -----------
14 -----------
15 The hg(1) command provides a command line interface to the Mercurial system.
15 The hg(1) command provides a command line interface to the Mercurial system.
16
16
17 COMMAND ELEMENTS
17 COMMAND ELEMENTS
18 ----------------
18 ----------------
19
19
20 files ...::
20 files ...::
21 indicates one or more filename or relative path filenames; see
21 indicates one or more filename or relative path filenames; see
22 "FILE NAME PATTERNS" for information on pattern matching
22 "FILE NAME PATTERNS" for information on pattern matching
23
23
24 path::
24 path::
25 indicates a path on the local machine
25 indicates a path on the local machine
26
26
27 revision::
27 revision::
28 indicates a changeset which can be specified as a changeset revision
28 indicates a changeset which can be specified as a changeset revision
29 number, a tag, or a unique substring of the changeset hash value
29 number, a tag, or a unique substring of the changeset hash value
30
30
31 repository path::
31 repository path::
32 either the pathname of a local repository or the URI of a remote
32 either the pathname of a local repository or the URI of a remote
33 repository. There are two available URI protocols, http:// which is
33 repository. There are two available URI protocols, http:// which is
34 fast and the old-http:// protocol which is much slower but does not
34 fast and the old-http:// protocol which is much slower but does not
35 require a special server on the web host.
35 require a special server on the web host.
36
36
37
37
38 include::hg.1.gendoc.txt[]
38 include::hg.1.gendoc.txt[]
39
39
40 FILE NAME PATTERNS
40 FILE NAME PATTERNS
41 ------------------
41 ------------------
42
42
43 Mercurial accepts several notations for identifying one or more
43 Mercurial accepts several notations for identifying one or more
44 files at a time.
44 files at a time.
45
45
46 By default, Mercurial treats filenames as shell-style extended
46 By default, Mercurial treats filenames as shell-style extended
47 glob patterns.
47 glob patterns.
48
48
49 Alternate pattern notations must be specified explicitly.
49 Alternate pattern notations must be specified explicitly.
50
50
51 To use a plain path name without any pattern matching, start a
51 To use a plain path name without any pattern matching, start a
52 name with "path:". These path names must match completely, from
52 name with "path:". These path names must match completely, from
53 the root of the current repository.
53 the root of the current repository.
54
54
55 To use an extended glob, start a name with "glob:". Globs are
55 To use an extended glob, start a name with "glob:". Globs are
56 rooted at the current directory; a glob such as "*.c" will match
56 rooted at the current directory; a glob such as "*.c" will match
57 files ending in ".c" in the current directory only.
57 files ending in ".c" in the current directory only.
58
58
59 The supported glob syntax extensions are "**" to match any string
59 The supported glob syntax extensions are "**" to match any string
60 across path separators, and "{a,b}" to mean "a or b".
60 across path separators, and "{a,b}" to mean "a or b".
61
61
62 To use a Perl/Python regular expression, start a name with "re:".
62 To use a Perl/Python regular expression, start a name with "re:".
63 Regexp pattern matching is anchored at the root of the repository.
63 Regexp pattern matching is anchored at the root of the repository.
64
64
65 Plain examples:
65 Plain examples:
66
66
67 path:foo/bar a name bar in a directory named foo in the root of
67 path:foo/bar a name bar in a directory named foo in the root of
68 the repository
68 the repository
69 path:path:name a file or directory named "path:name"
69 path:path:name a file or directory named "path:name"
70
70
71 Glob examples:
71 Glob examples:
72
72
73 glob:*.c any name ending in ".c" in the current directory
73 glob:*.c any name ending in ".c" in the current directory
74 *.c any name ending in ".c" in the current directory
74 *.c any name ending in ".c" in the current directory
75 **.c any name ending in ".c" in the current directory, or
75 **.c any name ending in ".c" in the current directory, or
76 any subdirectory
76 any subdirectory
77 foo/*.c any name ending in ".c" in the directory foo
77 foo/*.c any name ending in ".c" in the directory foo
78 foo/**.c any name ending in ".c" in the directory foo, or any
78 foo/**.c any name ending in ".c" in the directory foo, or any
79 subdirectory
79 subdirectory
80
80
81 Regexp examples:
81 Regexp examples:
82
82
83 re:.*\.c$ any name ending in ".c", anywhere in the repository
83 re:.*\.c$ any name ending in ".c", anywhere in the repository
84
84
85
85
86 SPECIFYING SINGLE REVISIONS
86 SPECIFYING SINGLE REVISIONS
87 ---------------------------
87 ---------------------------
88
88
89 Mercurial accepts several notations for identifying individual
89 Mercurial accepts several notations for identifying individual
90 revisions.
90 revisions.
91
91
92 A plain integer is treated as a revision number. Negative
92 A plain integer is treated as a revision number. Negative
93 integers are treated as offsets from the tip, with -1 denoting the
93 integers are treated as offsets from the tip, with -1 denoting the
94 tip.
94 tip.
95
95
96 A 40-digit hexadecimal string is treated as a unique revision
96 A 40-digit hexadecimal string is treated as a unique revision
97 identifier.
97 identifier.
98
98
99 A hexadecimal string less than 40 characters long is treated as a
99 A hexadecimal string less than 40 characters long is treated as a
100 unique revision identifier, and referred to as a short-form
100 unique revision identifier, and referred to as a short-form
101 identifier. A short-form identifier is only valid if it is the
101 identifier. A short-form identifier is only valid if it is the
102 prefix of one full-length identifier.
102 prefix of one full-length identifier.
103
103
104 Any other string is treated as a tag name, which is a symbolic
104 Any other string is treated as a tag name, which is a symbolic
105 name associated with a revision identifier. Tag names may not
105 name associated with a revision identifier. Tag names may not
106 contain the ":" character.
106 contain the ":" character.
107
107
108 The reserved name "tip" is a special tag that always identifies
108 The reserved name "tip" is a special tag that always identifies
109 the most recent revision.
109 the most recent revision.
110
110
111 SPECIFYING MULTIPLE REVISIONS
111 SPECIFYING MULTIPLE REVISIONS
112 -----------------------------
112 -----------------------------
113
113
114 When Mercurial accepts more than one revision, they may be
114 When Mercurial accepts more than one revision, they may be
115 specified individually, or provided as a continuous range,
115 specified individually, or provided as a continuous range,
116 separated by the ":" character.
116 separated by the ":" character.
117
117
118 The syntax of range notation is [BEGIN]:[END], where BEGIN and END
118 The syntax of range notation is [BEGIN]:[END], where BEGIN and END
119 are revision identifiers. Both BEGIN and END are optional. If
119 are revision identifiers. Both BEGIN and END are optional. If
120 BEGIN is not specified, it defaults to revision number 0. If END
120 BEGIN is not specified, it defaults to revision number 0. If END
121 is not specified, it defaults to the tip. The range ":" thus
121 is not specified, it defaults to the tip. The range ":" thus
122 means "all revisions".
122 means "all revisions".
123
123
124 If BEGIN is greater than END, revisions are treated in reverse
124 If BEGIN is greater than END, revisions are treated in reverse
125 order.
125 order.
126
126
127 A range acts as a closed interval. This means that a range of 3:5
127 A range acts as a closed interval. This means that a range of 3:5
128 gives 3, 4 and 5. Similarly, a range of 4:2 gives 4, 3, and 2.
128 gives 3, 4 and 5. Similarly, a range of 4:2 gives 4, 3, and 2.
129
129
130 ENVIRONMENT VARIABLES
130 ENVIRONMENT VARIABLES
131 ---------------------
131 ---------------------
132
132
133 HGEDITOR::
133 HGEDITOR::
134 This is the name of the editor to use when committing. Defaults to the
134 This is the name of the editor to use when committing. Defaults to the
135 value of EDITOR.
135 value of EDITOR.
136
136
137 (deprecated, use .hgrc)
137 (deprecated, use .hgrc)
138
138
139 HGMERGE::
139 HGMERGE::
140 An executable to use for resolving merge conflicts. The program
140 An executable to use for resolving merge conflicts. The program
141 will be executed with three arguments: local file, remote file,
141 will be executed with three arguments: local file, remote file,
142 ancestor file.
142 ancestor file.
143
143
144 The default program is "hgmerge", which is a shell script provided
144 The default program is "hgmerge", which is a shell script provided
145 by Mercurial with some sensible defaults.
145 by Mercurial with some sensible defaults.
146
146
147 (deprecated, use .hgrc)
147 (deprecated, use .hgrc)
148
148
149 HGRCPATH::
149 HGRCPATH::
150 A list of files or directories to search for hgrc files. Item
150 A list of files or directories to search for hgrc files. Item
151 separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set,
151 separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set,
152 platform default search path is used. If empty, only .hg/hgrc of
152 platform default search path is used. If empty, only .hg/hgrc of
153 current repository is read.
153 current repository is read.
154
154
155 For each element in path, if a directory, all entries in directory
155 For each element in path, if a directory, all entries in directory
156 ending with ".rc" are added to path. Else, element itself is
156 ending with ".rc" are added to path. Else, element itself is
157 added to path.
157 added to path.
158
158
159 HGUSER::
159 HGUSER::
160 This is the string used for the author of a commit.
160 This is the string used for the author of a commit.
161
161
162 (deprecated, use .hgrc)
162 (deprecated, use .hgrc)
163
163
164 EMAIL::
164 EMAIL::
165 If HGUSER is not set, this will be used as the author for a commit.
165 If HGUSER is not set, this will be used as the author for a commit.
166
166
167 LOGNAME::
167 LOGNAME::
168 If neither HGUSER nor EMAIL is set, LOGNAME will be used (with
168 If neither HGUSER nor EMAIL is set, LOGNAME will be used (with
169 '@hostname' appended) as the author value for a commit.
169 '@hostname' appended) as the author value for a commit.
170
170
171 EDITOR::
171 EDITOR::
172 This is the name of the editor used in the hgmerge script. It will be
172 This is the name of the editor used in the hgmerge script. It will be
173 used for commit messages if HGEDITOR isn't set. Defaults to 'vi'.
173 used for commit messages if HGEDITOR isn't set. Defaults to 'vi'.
174
174
175 PYTHONPATH::
175 PYTHONPATH::
176 This is used by Python to find imported modules and may need to be set
176 This is used by Python to find imported modules and may need to be set
177 appropriately if Mercurial is not installed system-wide.
177 appropriately if Mercurial is not installed system-wide.
178
178
179 FILES
179 FILES
180 -----
180 -----
181 .hgignore::
181 .hgignore::
182 This file contains regular expressions (one per line) that describe file
182 This file contains regular expressions (one per line) that describe file
183 names that should be ignored by hg.
183 names that should be ignored by hg. For details, see hgignore(5).
184
184
185 .hgtags::
185 .hgtags::
186 This file contains changeset hash values and text tag names (one of each
186 This file contains changeset hash values and text tag names (one of each
187 separated by spaces) that correspond to tagged versions of the repository
187 separated by spaces) that correspond to tagged versions of the repository
188 contents.
188 contents.
189
189
190 /etc/mercurial/hgrc, $HOME/.hgrc, .hg/hgrc::
190 /etc/mercurial/hgrc, $HOME/.hgrc, .hg/hgrc::
191 This file contains defaults and configuration. Values in .hg/hgrc
191 This file contains defaults and configuration. Values in .hg/hgrc
192 override those in $HOME/.hgrc, and these override settings made in the
192 override those in $HOME/.hgrc, and these override settings made in the
193 global /etc/mercurial/hgrc configuration. See hgrc(5) for details of
193 global /etc/mercurial/hgrc configuration. See hgrc(5) for details of
194 the contents and format of these files.
194 the contents and format of these files.
195
195
196 BUGS
196 BUGS
197 ----
197 ----
198 Probably lots, please post them to the mailing list (See Resources below)
198 Probably lots, please post them to the mailing list (See Resources below)
199 when you find them.
199 when you find them.
200
200
201 SEE ALSO
201 SEE ALSO
202 --------
202 --------
203 hgrc(5)
203 hgignore(5), hgrc(5)
204
204
205 AUTHOR
205 AUTHOR
206 ------
206 ------
207 Written by Matt Mackall <mpm@selenic.com>
207 Written by Matt Mackall <mpm@selenic.com>
208
208
209 RESOURCES
209 RESOURCES
210 ---------
210 ---------
211 http://selenic.com/mercurial[Main Web Site]
211 http://selenic.com/mercurial[Main Web Site]
212
212
213 http://selenic.com/hg[Source code repository]
213 http://selenic.com/hg[Source code repository]
214
214
215 http://selenic.com/mailman/listinfo/mercurial[Mailing list]
215 http://selenic.com/mailman/listinfo/mercurial[Mailing list]
216
216
217 COPYING
217 COPYING
218 -------
218 -------
219 Copyright \(C) 2005 Matt Mackall.
219 Copyright \(C) 2005 Matt Mackall.
220 Free use of this software is granted under the terms of the GNU General
220 Free use of this software is granted under the terms of the GNU General
221 Public License (GPL).
221 Public License (GPL).
@@ -1,368 +1,369 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 Per-user configuration file, for the user running Mercurial.
40 Per-user configuration file, for the user running Mercurial.
41 Options in this file apply to all Mercurial commands executed by
41 Options in this file apply to all Mercurial commands executed by
42 any user in any directory. Options in this file override
42 any user in any directory. Options in this file override
43 per-installation and per-system options.
43 per-installation and per-system options.
44
44
45 (Unix, Windows) <repo>/.hg/hgrc::
45 (Unix, Windows) <repo>/.hg/hgrc::
46 Per-repository configuration options that only apply in a
46 Per-repository configuration options that only apply in a
47 particular repository. This file is not version-controlled, and
47 particular repository. This file is not version-controlled, and
48 will not get transferred during a "clone" operation. Options in
48 will not get transferred during a "clone" operation. Options in
49 this file override options in all other configuration files.
49 this file override options in all other configuration files.
50
50
51 SYNTAX
51 SYNTAX
52 ------
52 ------
53
53
54 A configuration file consists of sections, led by a "[section]" header
54 A configuration file consists of sections, led by a "[section]" header
55 and followed by "name: value" entries; "name=value" is also accepted.
55 and followed by "name: value" entries; "name=value" is also accepted.
56
56
57 [spam]
57 [spam]
58 eggs=ham
58 eggs=ham
59 green=
59 green=
60 eggs
60 eggs
61
61
62 Each line contains one entry. If the lines that follow are indented,
62 Each line contains one entry. If the lines that follow are indented,
63 they are treated as continuations of that entry.
63 they are treated as continuations of that entry.
64
64
65 Leading whitespace is removed from values. Empty lines are skipped.
65 Leading whitespace is removed from values. Empty lines are skipped.
66
66
67 The optional values can contain format strings which refer to other
67 The optional values can contain format strings which refer to other
68 values in the same section, or values in a special DEFAULT section.
68 values in the same section, or values in a special DEFAULT section.
69
69
70 Lines beginning with "#" or ";" are ignored and may be used to provide
70 Lines beginning with "#" or ";" are ignored and may be used to provide
71 comments.
71 comments.
72
72
73 SECTIONS
73 SECTIONS
74 --------
74 --------
75
75
76 This section describes the different sections that may appear in a
76 This section describes the different sections that may appear in a
77 Mercurial "hgrc" file, the purpose of each section, its possible
77 Mercurial "hgrc" file, the purpose of each section, its possible
78 keys, and their possible values.
78 keys, and their possible values.
79
79
80 decode/encode::
80 decode/encode::
81 Filters for transforming files on checkout/checkin. This would
81 Filters for transforming files on checkout/checkin. This would
82 typically be used for newline processing or other
82 typically be used for newline processing or other
83 localization/canonicalization of files.
83 localization/canonicalization of files.
84
84
85 Filters consist of a filter pattern followed by a filter command.
85 Filters consist of a filter pattern followed by a filter command.
86 Filter patterns are globs by default, rooted at the repository
86 Filter patterns are globs by default, rooted at the repository
87 root. For example, to match any file ending in ".txt" in the root
87 root. For example, to match any file ending in ".txt" in the root
88 directory only, use the pattern "*.txt". To match any file ending
88 directory only, use the pattern "*.txt". To match any file ending
89 in ".c" anywhere in the repository, use the pattern "**.c".
89 in ".c" anywhere in the repository, use the pattern "**.c".
90
90
91 The filter command can start with a specifier, either "pipe:" or
91 The filter command can start with a specifier, either "pipe:" or
92 "tempfile:". If no specifier is given, "pipe:" is used by default.
92 "tempfile:". If no specifier is given, "pipe:" is used by default.
93
93
94 A "pipe:" command must accept data on stdin and return the
94 A "pipe:" command must accept data on stdin and return the
95 transformed data on stdout.
95 transformed data on stdout.
96
96
97 Pipe example:
97 Pipe example:
98
98
99 [encode]
99 [encode]
100 # uncompress gzip files on checkin to improve delta compression
100 # uncompress gzip files on checkin to improve delta compression
101 # note: not necessarily a good idea, just an example
101 # note: not necessarily a good idea, just an example
102 *.gz = pipe: gunzip
102 *.gz = pipe: gunzip
103
103
104 [decode]
104 [decode]
105 # recompress gzip files when writing them to the working dir (we
105 # recompress gzip files when writing them to the working dir (we
106 # can safely omit "pipe:", because it's the default)
106 # can safely omit "pipe:", because it's the default)
107 *.gz = gzip
107 *.gz = gzip
108
108
109 A "tempfile:" command is a template. The string INFILE is replaced
109 A "tempfile:" command is a template. The string INFILE is replaced
110 with the name of a temporary file that contains the data to be
110 with the name of a temporary file that contains the data to be
111 filtered by the command. The string OUTFILE is replaced with the
111 filtered by the command. The string OUTFILE is replaced with the
112 name of an empty temporary file, where the filtered data must be
112 name of an empty temporary file, where the filtered data must be
113 written by the command.
113 written by the command.
114
114
115 NOTE: the tempfile mechanism is recommended for Windows systems,
115 NOTE: the tempfile mechanism is recommended for Windows systems,
116 where the standard shell I/O redirection operators often have
116 where the standard shell I/O redirection operators often have
117 strange effects. In particular, if you are doing line ending
117 strange effects. In particular, if you are doing line ending
118 conversion on Windows using the popular dos2unix and unix2dos
118 conversion on Windows using the popular dos2unix and unix2dos
119 programs, you *must* use the tempfile mechanism, as using pipes will
119 programs, you *must* use the tempfile mechanism, as using pipes will
120 corrupt the contents of your files.
120 corrupt the contents of your files.
121
121
122 Tempfile example:
122 Tempfile example:
123
123
124 [encode]
124 [encode]
125 # convert files to unix line ending conventions on checkin
125 # convert files to unix line ending conventions on checkin
126 **.txt = tempfile: dos2unix -n INFILE OUTFILE
126 **.txt = tempfile: dos2unix -n INFILE OUTFILE
127
127
128 [decode]
128 [decode]
129 # convert files to windows line ending conventions when writing
129 # convert files to windows line ending conventions when writing
130 # them to the working dir
130 # them to the working dir
131 **.txt = tempfile: unix2dos -n INFILE OUTFILE
131 **.txt = tempfile: unix2dos -n INFILE OUTFILE
132
132
133 email::
133 email::
134 Settings for extensions that send email messages.
134 Settings for extensions that send email messages.
135 from;;
135 from;;
136 Optional. Email address to use in "From" header and SMTP envelope
136 Optional. Email address to use in "From" header and SMTP envelope
137 of outgoing messages.
137 of outgoing messages.
138
138
139 hooks::
139 hooks::
140 Commands or Python functions that get automatically executed by
140 Commands or Python functions that get automatically executed by
141 various actions such as starting or finishing a commit. Multiple
141 various actions such as starting or finishing a commit. Multiple
142 hooks can be run for the same action by appending a suffix to the
142 hooks can be run for the same action by appending a suffix to the
143 action. Overriding a site-wide hook can be done by changing its
143 action. Overriding a site-wide hook can be done by changing its
144 value or setting it to an empty string.
144 value or setting it to an empty string.
145
145
146 Example .hg/hgrc:
146 Example .hg/hgrc:
147
147
148 [hooks]
148 [hooks]
149 # do not use the site-wide hook
149 # do not use the site-wide hook
150 incoming =
150 incoming =
151 incoming.email = /my/email/hook
151 incoming.email = /my/email/hook
152 incoming.autobuild = /my/build/hook
152 incoming.autobuild = /my/build/hook
153
153
154 Most hooks are run with environment variables set that give added
154 Most hooks are run with environment variables set that give added
155 useful information. For each hook below, the environment variables
155 useful information. For each hook below, the environment variables
156 it is passed are listed with names of the form "$HG_foo".
156 it is passed are listed with names of the form "$HG_foo".
157
157
158 changegroup;;
158 changegroup;;
159 Run after a changegroup has been added via push, pull or
159 Run after a changegroup has been added via push, pull or
160 unbundle. ID of the first new changeset is in $HG_NODE.
160 unbundle. ID of the first new changeset is in $HG_NODE.
161 commit;;
161 commit;;
162 Run after a changeset has been created in the local repository.
162 Run after a changeset has been created in the local repository.
163 ID of the newly created changeset is in $HG_NODE. Parent
163 ID of the newly created changeset is in $HG_NODE. Parent
164 changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
164 changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
165 incoming;;
165 incoming;;
166 Run after a changeset has been pulled, pushed, or unbundled into
166 Run after a changeset has been pulled, pushed, or unbundled into
167 the local repository. The ID of the newly arrived changeset is in
167 the local repository. The ID of the newly arrived changeset is in
168 $HG_NODE.
168 $HG_NODE.
169 outgoing;;
169 outgoing;;
170 Run after sending changes from local repository to another. ID of
170 Run after sending changes from local repository to another. ID of
171 first changeset sent is in $HG_NODE. Source of operation is in
171 first changeset sent is in $HG_NODE. Source of operation is in
172 $HG_SOURCE; see "preoutgoing" hook for description.
172 $HG_SOURCE; see "preoutgoing" hook for description.
173 prechangegroup;;
173 prechangegroup;;
174 Run before a changegroup is added via push, pull or unbundle.
174 Run before a changegroup is added via push, pull or unbundle.
175 Exit status 0 allows the changegroup to proceed. Non-zero status
175 Exit status 0 allows the changegroup to proceed. Non-zero status
176 will cause the push, pull or unbundle to fail.
176 will cause the push, pull or unbundle to fail.
177 precommit;;
177 precommit;;
178 Run before starting a local commit. Exit status 0 allows the
178 Run before starting a local commit. Exit status 0 allows the
179 commit to proceed. Non-zero status will cause the commit to fail.
179 commit to proceed. Non-zero status will cause the commit to fail.
180 Parent changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
180 Parent changeset IDs are in $HG_PARENT1 and $HG_PARENT2.
181 preoutgoing;;
181 preoutgoing;;
182 Run before computing changes to send from the local repository to
182 Run before computing changes to send from the local repository to
183 another. Non-zero status will cause failure. This lets you
183 another. Non-zero status will cause failure. This lets you
184 prevent pull over http or ssh. Also prevents against local pull,
184 prevent pull over http or ssh. Also prevents against local pull,
185 push (outbound) or bundle commands, but not effective, since you
185 push (outbound) or bundle commands, but not effective, since you
186 can just copy files instead then. Source of operation is in
186 can just copy files instead then. Source of operation is in
187 $HG_SOURCE. If "serve", operation is happening on behalf of
187 $HG_SOURCE. If "serve", operation is happening on behalf of
188 remote ssh or http repository. If "push", "pull" or "bundle",
188 remote ssh or http repository. If "push", "pull" or "bundle",
189 operation is happening on behalf of repository on same system.
189 operation is happening on behalf of repository on same system.
190 pretag;;
190 pretag;;
191 Run before creating a tag. Exit status 0 allows the tag to be
191 Run before creating a tag. Exit status 0 allows the tag to be
192 created. Non-zero status will cause the tag to fail. ID of
192 created. Non-zero status will cause the tag to fail. ID of
193 changeset to tag is in $HG_NODE. Name of tag is in $HG_TAG. Tag
193 changeset to tag is in $HG_NODE. Name of tag is in $HG_TAG. Tag
194 is local if $HG_LOCAL=1, in repo if $HG_LOCAL=0.
194 is local if $HG_LOCAL=1, in repo if $HG_LOCAL=0.
195 pretxnchangegroup;;
195 pretxnchangegroup;;
196 Run after a changegroup has been added via push, pull or unbundle,
196 Run after a changegroup has been added via push, pull or unbundle,
197 but before the transaction has been committed. Changegroup is
197 but before the transaction has been committed. Changegroup is
198 visible to hook program. This lets you validate incoming changes
198 visible to hook program. This lets you validate incoming changes
199 before accepting them. Passed the ID of the first new changeset
199 before accepting them. Passed the ID of the first new changeset
200 in $HG_NODE. Exit status 0 allows the transaction to commit.
200 in $HG_NODE. Exit status 0 allows the transaction to commit.
201 Non-zero status will cause the transaction to be rolled back and
201 Non-zero status will cause the transaction to be rolled back and
202 the push, pull or unbundle will fail.
202 the push, pull or unbundle will fail.
203 pretxncommit;;
203 pretxncommit;;
204 Run after a changeset has been created but the transaction not yet
204 Run after a changeset has been created but the transaction not yet
205 committed. Changeset is visible to hook program. This lets you
205 committed. Changeset is visible to hook program. This lets you
206 validate commit message and changes. Exit status 0 allows the
206 validate commit message and changes. Exit status 0 allows the
207 commit to proceed. Non-zero status will cause the transaction to
207 commit to proceed. Non-zero status will cause the transaction to
208 be rolled back. ID of changeset is in $HG_NODE. Parent changeset
208 be rolled back. ID of changeset is in $HG_NODE. Parent changeset
209 IDs are in $HG_PARENT1 and $HG_PARENT2.
209 IDs are in $HG_PARENT1 and $HG_PARENT2.
210 tag;;
210 tag;;
211 Run after a tag is created. ID of tagged changeset is in
211 Run after a tag is created. ID of tagged changeset is in
212 $HG_NODE. Name of tag is in $HG_TAG. Tag is local if
212 $HG_NODE. Name of tag is in $HG_TAG. Tag is local if
213 $HG_LOCAL=1, in repo if $HG_LOCAL=0.
213 $HG_LOCAL=1, in repo if $HG_LOCAL=0.
214
214
215 In earlier releases, the names of hook environment variables did not
215 In earlier releases, the names of hook environment variables did not
216 have a "HG_" prefix. These unprefixed names are still provided in
216 have a "HG_" prefix. These unprefixed names are still provided in
217 the environment for backwards compatibility, but their use is
217 the environment for backwards compatibility, but their use is
218 deprecated, and they will be removed in a future release.
218 deprecated, and they will be removed in a future release.
219
219
220 The syntax for Python hooks is as follows:
220 The syntax for Python hooks is as follows:
221
221
222 hookname = python:modulename.submodule.callable
222 hookname = python:modulename.submodule.callable
223
223
224 Python hooks are run within the Mercurial process. Each hook is
224 Python hooks are run within the Mercurial process. Each hook is
225 called with at least three keyword arguments: a ui object (keyword
225 called with at least three keyword arguments: a ui object (keyword
226 "ui"), a repository object (keyword "repo"), and a "hooktype"
226 "ui"), a repository object (keyword "repo"), and a "hooktype"
227 keyword that tells what kind of hook is used. Arguments listed as
227 keyword that tells what kind of hook is used. Arguments listed as
228 environment variables above are passed as keyword arguments, with no
228 environment variables above are passed as keyword arguments, with no
229 "HG_" prefix, and names in lower case.
229 "HG_" prefix, and names in lower case.
230
230
231 A Python hook must return a "true" value to succeed. Returning a
231 A Python hook must return a "true" value to succeed. Returning a
232 "false" value or raising an exception is treated as failure of the
232 "false" value or raising an exception is treated as failure of the
233 hook.
233 hook.
234
234
235 http_proxy::
235 http_proxy::
236 Used to access web-based Mercurial repositories through a HTTP
236 Used to access web-based Mercurial repositories through a HTTP
237 proxy.
237 proxy.
238 host;;
238 host;;
239 Host name and (optional) port of the proxy server, for example
239 Host name and (optional) port of the proxy server, for example
240 "myproxy:8000".
240 "myproxy:8000".
241 no;;
241 no;;
242 Optional. Comma-separated list of host names that should bypass
242 Optional. Comma-separated list of host names that should bypass
243 the proxy.
243 the proxy.
244 passwd;;
244 passwd;;
245 Optional. Password to authenticate with at the proxy server.
245 Optional. Password to authenticate with at the proxy server.
246 user;;
246 user;;
247 Optional. User name to authenticate with at the proxy server.
247 Optional. User name to authenticate with at the proxy server.
248
248
249 smtp::
249 smtp::
250 Configuration for extensions that need to send email messages.
250 Configuration for extensions that need to send email messages.
251 host;;
251 host;;
252 Optional. Host name of mail server. Default: "mail".
252 Optional. Host name of mail server. Default: "mail".
253 port;;
253 port;;
254 Optional. Port to connect to on mail server. Default: 25.
254 Optional. Port to connect to on mail server. Default: 25.
255 tls;;
255 tls;;
256 Optional. Whether to connect to mail server using TLS. True or
256 Optional. Whether to connect to mail server using TLS. True or
257 False. Default: False.
257 False. Default: False.
258 username;;
258 username;;
259 Optional. User name to authenticate to SMTP server with.
259 Optional. User name to authenticate to SMTP server with.
260 If username is specified, password must also be specified.
260 If username is specified, password must also be specified.
261 Default: none.
261 Default: none.
262 password;;
262 password;;
263 Optional. Password to authenticate to SMTP server with.
263 Optional. Password to authenticate to SMTP server with.
264 If username is specified, password must also be specified.
264 If username is specified, password must also be specified.
265 Default: none.
265 Default: none.
266
266
267 paths::
267 paths::
268 Assigns symbolic names to repositories. The left side is the
268 Assigns symbolic names to repositories. The left side is the
269 symbolic name, and the right gives the directory or URL that is the
269 symbolic name, and the right gives the directory or URL that is the
270 location of the repository.
270 location of the repository.
271
271
272 ui::
272 ui::
273 User interface controls.
273 User interface controls.
274 debug;;
274 debug;;
275 Print debugging information. True or False. Default is False.
275 Print debugging information. True or False. Default is False.
276 editor;;
276 editor;;
277 The editor to use during a commit. Default is $EDITOR or "vi".
277 The editor to use during a commit. Default is $EDITOR or "vi".
278 ignore;;
278 ignore;;
279 A file to read per-user ignore patterns from. This file should be in
279 A file to read per-user ignore patterns from. This file should be in
280 the same format as a repository-wide .hgignore file. This option
280 the same format as a repository-wide .hgignore file. This option
281 supports hook syntax, so if you want to specify multiple ignore
281 supports hook syntax, so if you want to specify multiple ignore
282 files, you can do so by setting something like
282 files, you can do so by setting something like
283 "ignore.other = ~/.hgignore2".
283 "ignore.other = ~/.hgignore2". For details of the ignore file
284 format, see the hgignore(5) man page.
284 interactive;;
285 interactive;;
285 Allow to prompt the user. True or False. Default is True.
286 Allow to prompt the user. True or False. Default is True.
286 logtemplate;;
287 logtemplate;;
287 Template string for commands that print changesets.
288 Template string for commands that print changesets.
288 style;;
289 style;;
289 Name of style to use for command output.
290 Name of style to use for command output.
290 merge;;
291 merge;;
291 The conflict resolution program to use during a manual merge.
292 The conflict resolution program to use during a manual merge.
292 Default is "hgmerge".
293 Default is "hgmerge".
293 quiet;;
294 quiet;;
294 Reduce the amount of output printed. True or False. Default is False.
295 Reduce the amount of output printed. True or False. Default is False.
295 remotecmd;;
296 remotecmd;;
296 remote command to use for clone/push/pull operations. Default is 'hg'.
297 remote command to use for clone/push/pull operations. Default is 'hg'.
297 ssh;;
298 ssh;;
298 command to use for SSH connections. Default is 'ssh'.
299 command to use for SSH connections. Default is 'ssh'.
299 timeout;;
300 timeout;;
300 The timeout used when a lock is held (in seconds), a negative value
301 The timeout used when a lock is held (in seconds), a negative value
301 means no timeout. Default is 600.
302 means no timeout. Default is 600.
302 username;;
303 username;;
303 The committer of a changeset created when running "commit".
304 The committer of a changeset created when running "commit".
304 Typically a person's name and email address, e.g. "Fred Widget
305 Typically a person's name and email address, e.g. "Fred Widget
305 <fred@example.com>". Default is $EMAIL or username@hostname, unless
306 <fred@example.com>". Default is $EMAIL or username@hostname, unless
306 username is set to an empty string, which enforces specifying the
307 username is set to an empty string, which enforces specifying the
307 username manually.
308 username manually.
308 verbose;;
309 verbose;;
309 Increase the amount of output printed. True or False. Default is False.
310 Increase the amount of output printed. True or False. Default is False.
310
311
311
312
312 web::
313 web::
313 Web interface configuration.
314 Web interface configuration.
314 accesslog;;
315 accesslog;;
315 Where to output the access log. Default is stdout.
316 Where to output the access log. Default is stdout.
316 address;;
317 address;;
317 Interface address to bind to. Default is all.
318 Interface address to bind to. Default is all.
318 allowbz2;;
319 allowbz2;;
319 Whether to allow .tar.bz2 downloading of repo revisions. Default is false.
320 Whether to allow .tar.bz2 downloading of repo revisions. Default is false.
320 allowgz;;
321 allowgz;;
321 Whether to allow .tar.gz downloading of repo revisions. Default is false.
322 Whether to allow .tar.gz downloading of repo revisions. Default is false.
322 allowpull;;
323 allowpull;;
323 Whether to allow pulling from the repository. Default is true.
324 Whether to allow pulling from the repository. Default is true.
324 allowzip;;
325 allowzip;;
325 Whether to allow .zip downloading of repo revisions. Default is false.
326 Whether to allow .zip downloading of repo revisions. Default is false.
326 This feature creates temporary files.
327 This feature creates temporary files.
327 baseurl;;
328 baseurl;;
328 Base URL to use when publishing URLs in other locations, so
329 Base URL to use when publishing URLs in other locations, so
329 third-party tools like email notification hooks can construct URLs.
330 third-party tools like email notification hooks can construct URLs.
330 Example: "http://hgserver/repos/"
331 Example: "http://hgserver/repos/"
331 description;;
332 description;;
332 Textual description of the repository's purpose or contents.
333 Textual description of the repository's purpose or contents.
333 Default is "unknown".
334 Default is "unknown".
334 errorlog;;
335 errorlog;;
335 Where to output the error log. Default is stderr.
336 Where to output the error log. Default is stderr.
336 ipv6;;
337 ipv6;;
337 Whether to use IPv6. Default is false.
338 Whether to use IPv6. Default is false.
338 name;;
339 name;;
339 Repository name to use in the web interface. Default is current
340 Repository name to use in the web interface. Default is current
340 working directory.
341 working directory.
341 maxchanges;;
342 maxchanges;;
342 Maximum number of changes to list on the changelog. Default is 10.
343 Maximum number of changes to list on the changelog. Default is 10.
343 maxfiles;;
344 maxfiles;;
344 Maximum number of files to list per changeset. Default is 10.
345 Maximum number of files to list per changeset. Default is 10.
345 port;;
346 port;;
346 Port to listen on. Default is 8000.
347 Port to listen on. Default is 8000.
347 style;;
348 style;;
348 Which template map style to use.
349 Which template map style to use.
349 templates;;
350 templates;;
350 Where to find the HTML templates. Default is install path.
351 Where to find the HTML templates. Default is install path.
351
352
352
353
353 AUTHOR
354 AUTHOR
354 ------
355 ------
355 Bryan O'Sullivan <bos@serpentine.com>.
356 Bryan O'Sullivan <bos@serpentine.com>.
356
357
357 Mercurial was written by Matt Mackall <mpm@selenic.com>.
358 Mercurial was written by Matt Mackall <mpm@selenic.com>.
358
359
359 SEE ALSO
360 SEE ALSO
360 --------
361 --------
361 hg(1)
362 hg(1), hgignore(5)
362
363
363 COPYING
364 COPYING
364 -------
365 -------
365 This manual page is copyright 2005 Bryan O'Sullivan.
366 This manual page is copyright 2005 Bryan O'Sullivan.
366 Mercurial is copyright 2005 Matt Mackall.
367 Mercurial is copyright 2005, 2006 Matt Mackall.
367 Free use of this software is granted under the terms of the GNU General
368 Free use of this software is granted under the terms of the GNU General
368 Public License (GPL).
369 Public License (GPL).
General Comments 0
You need to be logged in to leave comments. Login now