##// END OF EJS Templates
Update hgrc documentation to refer to Windows paths.
Bryan O'Sullivan -
r1304:a69e5a67 default
parent child Browse files
Show More
@@ -1,225 +1,229 b''
1 1 HGRC(5)
2 2 =======
3 3 Bryan O'Sullivan <bos@serpentine.com>
4 4
5 5 NAME
6 6 ----
7 7 hgrc - configuration files for Mercurial
8 8
9 9 SYNOPSIS
10 10 --------
11 11
12 12 The Mercurial system uses a set of configuration files to control
13 13 aspects of its behaviour.
14 14
15 15 FILES
16 16 -----
17 17
18 Mercurial reads configuration data from three files:
18 Mercurial reads configuration data from up to three files, if they
19 exist. The names of these files depend on the system on which
20 Mercurial is installed.
19 21
20 /etc/mercurial/hgrc::
22 (Unix) /etc/mercurial/hgrc::
23 (Windows) C:\Mercurial\Mercurial.ini::
21 24 Options in this global configuration file apply to all Mercurial
22 25 commands executed by any user in any directory.
23 26
24 $HOME/.hgrc::
27 (Unix) $HOME/.hgrc::
28 (Windows) C:\Documents and Settings\USERNAME\Mercurial.ini
25 29 Per-user configuration options that apply to all Mercurial commands,
26 30 no matter from which directory they are run. Values in this file
27 31 override global settings.
28 32
29 <repo>/.hg/hgrc::
33 (Unix, Windows) <repo>/.hg/hgrc::
30 34 Per-repository configuration options that only apply in a
31 35 particular repository. This file is not version-controlled, and
32 36 will not get transferred during a "clone" operation. Values in
33 37 this file override global and per-user settings.
34 38
35 39 SYNTAX
36 40 ------
37 41
38 42 A configuration file consists of sections, led by a "[section]" header
39 43 and followed by "name: value" entries; "name=value" is also accepted.
40 44
41 45 [spam]
42 46 eggs=ham
43 47 green=
44 48 eggs
45 49
46 50 Each line contains one entry. If the lines that follow are indented,
47 51 they are treated as continuations of that entry.
48 52
49 53 Leading whitespace is removed from values. Empty lines are skipped.
50 54
51 55 The optional values can contain format strings which refer to other
52 56 values in the same section, or values in a special DEFAULT section.
53 57
54 58 Lines beginning with "#" or ";" are ignored and may be used to provide
55 59 comments.
56 60
57 61 SECTIONS
58 62 --------
59 63
60 64 This section describes the different sections that may appear in a
61 65 Mercurial "hgrc" file, the purpose of each section, its possible
62 66 keys, and their possible values.
63 67
64 68 decode/encode::
65 69 Filters for transforming files on checkout/checkin. This would
66 70 typically be used for newline processing or other
67 71 localization/canonicalization of files.
68 72
69 73 Filters consist of a filter pattern followed by a filter command.
70 74 Filter patterns are globs by default, rooted at the repository
71 75 root. For example, to match any file ending in ".txt" in the root
72 76 directory only, use the pattern "*.txt". To match any file ending
73 77 in ".c" anywhere in the repository, use the pattern "**.c".
74 78
75 79 The filter command can start with a specifier, either "pipe:" or
76 80 "tempfile:". If no specifier is given, "pipe:" is used by default.
77 81
78 82 A "pipe:" command must accept data on stdin and return the
79 83 transformed data on stdout.
80 84
81 85 Pipe example:
82 86
83 87 [encode]
84 88 # uncompress gzip files on checkin to improve delta compression
85 89 # note: not necessarily a good idea, just an example
86 90 *.gz = pipe: gunzip
87 91
88 92 [decode]
89 93 # recompress gzip files when writing them to the working dir (we
90 94 # can safely omit "pipe:", because it's the default)
91 95 *.gz = gzip
92 96
93 97 A "tempfile:" command is a template. The string INFILE is replaced
94 98 with the name of a temporary file that contains the data to be
95 99 filtered by the command. The string OUTFILE is replaced with the
96 100 name of an empty temporary file, where the filtered data must be
97 101 written by the command.
98 102
99 103 NOTE: the tempfile mechanism is recommended for Windows systems,
100 104 where the standard shell I/O redirection operators often have
101 105 strange effects. In particular, if you are doing line ending
102 106 conversion on Windows using the popular dos2unix and unix2dos
103 107 programs, you *must* use the tempfile mechanism, as using pipes will
104 108 corrupt the contents of your files.
105 109
106 110 Tempfile example:
107 111
108 112 [encode]
109 113 # convert files to unix line ending conventions on checkin
110 114 **.txt = tempfile: dos2unix -n INFILE OUTFILE
111 115
112 116 [decode]
113 117 # convert files to windows line ending conventions when writing
114 118 # them to the working dir
115 119 **.txt = tempfile: unix2dos -n INFILE OUTFILE
116 120
117 121 hooks::
118 122 Commands that get automatically executed by various actions such as
119 123 starting or finishing a commit.
120 124 changegroup;;
121 125 Run after a changegroup has been added via push or pull.
122 126 commit;;
123 127 Run after a changeset has been created. Passed the ID of the newly
124 128 created changeset.
125 129 precommit;;
126 130 Run before starting a commit. Exit status 0 allows the commit to
127 131 proceed. Non-zero status will cause the commit to fail.
128 132
129 133 http_proxy::
130 134 Used to access web-based Mercurial repositories through a HTTP
131 135 proxy.
132 136 host;;
133 137 Host name and (optional) port of the proxy server, for example
134 138 "myproxy:8000".
135 139 no;;
136 140 Optional. Comma-separated list of host names that should bypass
137 141 the proxy.
138 142 passwd;;
139 143 Optional. Password to authenticate with at the proxy server.
140 144 user;;
141 145 Optional. User name to authenticate with at the proxy server.
142 146
143 147 paths::
144 148 Assigns symbolic names to repositories. The left side is the
145 149 symbolic name, and the right gives the directory or URL that is the
146 150 location of the repository.
147 151
148 152 ui::
149 153 User interface controls.
150 154 debug;;
151 155 Print debugging information. True or False. Default is False.
152 156 editor;;
153 157 The editor to use during a commit. Default is $EDITOR or "vi".
154 158 interactive;;
155 159 Allow to prompt the user. True or False. Default is True.
156 160 merge;;
157 161 The conflict resolution program to use during a manual merge.
158 162 Default is "hgmerge".
159 163 quiet;;
160 164 Reduce the amount of output printed. True or False. Default is False.
161 165 remotecmd;;
162 166 remote command to use for clone/push/pull operations. Default is 'hg'.
163 167 ssh;;
164 168 command to use for SSH connections. Default is 'ssh'.
165 169 username;;
166 170 The committer of a changeset created when running "commit".
167 171 Typically a person's name and email address, e.g. "Fred Widget
168 172 <fred@example.com>". Default is $EMAIL or username@hostname.
169 173 verbose;;
170 174 Increase the amount of output printed. True or False. Default is False.
171 175
172 176
173 177 web::
174 178 Web interface configuration.
175 179 accesslog;;
176 180 Where to output the access log. Default is stdout.
177 181 address;;
178 182 Interface address to bind to. Default is all.
179 183 allowbz2;;
180 184 Whether to allow .tar.bz2 downloading of repo revisions. Default is false.
181 185 allowgz;;
182 186 Whether to allow .tar.gz downloading of repo revisions. Default is false.
183 187 allowpull;;
184 188 Whether to allow pulling from the repository. Default is true.
185 189 allowzip;;
186 190 Whether to allow .zip downloading of repo revisions. Default is false.
187 191 This feature creates temporary files.
188 192 description;;
189 193 Textual description of the repository's purpose or contents.
190 194 Default is "unknown".
191 195 errorlog;;
192 196 Where to output the error log. Default is stderr.
193 197 ipv6;;
194 198 Whether to use IPv6. Default is false.
195 199 name;;
196 200 Repository name to use in the web interface. Default is current
197 201 working directory.
198 202 maxchanges;;
199 203 Maximum number of changes to list on the changelog. Default is 10.
200 204 maxfiles;;
201 205 Maximum number of files to list per changeset. Default is 10.
202 206 port;;
203 207 Port to listen on. Default is 8000.
204 208 style;;
205 209 Which template map style to use.
206 210 templates;;
207 211 Where to find the HTML templates. Default is install path.
208 212
209 213
210 214 AUTHOR
211 215 ------
212 216 Bryan O'Sullivan <bos@serpentine.com>.
213 217
214 218 Mercurial was written by Matt Mackall <mpm@selenic.com>.
215 219
216 220 SEE ALSO
217 221 --------
218 222 hg(1)
219 223
220 224 COPYING
221 225 -------
222 226 This manual page is copyright 2005 Bryan O'Sullivan.
223 227 Mercurial is copyright 2005 Matt Mackall.
224 228 Free use of this software is granted under the terms of the GNU General
225 229 Public License (GPL).
General Comments 0
You need to be logged in to leave comments. Login now