Show More
@@ -1,624 +1,645 | |||||
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 | OPTIONS |
|
17 | OPTIONS | |
18 | ------- |
|
18 | ------- | |
19 |
|
19 | |||
20 | --debug, -d:: |
|
20 | --debug, -d:: | |
21 | enable debugging output |
|
21 | enable debugging output | |
22 |
|
22 | |||
23 | --quiet, -q:: |
|
23 | --quiet, -q:: | |
24 | suppress output |
|
24 | suppress output | |
25 |
|
25 | |||
26 | --verbose, -v:: |
|
26 | --verbose, -v:: | |
27 | enable additional output |
|
27 | enable additional output | |
28 |
|
28 | |||
29 | --noninteractive, -y:: |
|
29 | --noninteractive, -y:: | |
30 | do not prompt, assume 'yes' for any required answers |
|
30 | do not prompt, assume 'yes' for any required answers | |
31 |
|
31 | |||
32 | COMMAND ELEMENTS |
|
32 | COMMAND ELEMENTS | |
33 | ---------------- |
|
33 | ---------------- | |
34 |
|
34 | |||
35 | files ...:: |
|
35 | files ...:: | |
36 | indicates one or more filename or relative path filenames; see |
|
36 | indicates one or more filename or relative path filenames; see | |
37 | "FILE NAME PATTERNS" for information on pattern matching |
|
37 | "FILE NAME PATTERNS" for information on pattern matching | |
38 |
|
38 | |||
39 | path:: |
|
39 | path:: | |
40 | indicates a path on the local machine |
|
40 | indicates a path on the local machine | |
41 |
|
41 | |||
42 | revision:: |
|
42 | revision:: | |
43 | indicates a changeset which can be specified as a changeset revision |
|
43 | indicates a changeset which can be specified as a changeset revision | |
44 | number, a tag, or a unique substring of the changeset hash value |
|
44 | number, a tag, or a unique substring of the changeset hash value | |
45 |
|
45 | |||
46 | repository path:: |
|
46 | repository path:: | |
47 | either the pathname of a local repository or the URI of a remote |
|
47 | either the pathname of a local repository or the URI of a remote | |
48 | repository. There are two available URI protocols, http:// which is |
|
48 | repository. There are two available URI protocols, http:// which is | |
49 | fast and the old-http:// protocol which is much slower but does not |
|
49 | fast and the old-http:// protocol which is much slower but does not | |
50 | require a special server on the web host. |
|
50 | require a special server on the web host. | |
51 |
|
51 | |||
52 | COMMANDS |
|
52 | COMMANDS | |
53 | -------- |
|
53 | -------- | |
54 |
|
54 | |||
55 | add [options] [files ...]:: |
|
55 | add [options] [files ...]:: | |
56 | Schedule files to be version controlled and added to the repository. |
|
56 | Schedule files to be version controlled and added to the repository. | |
57 |
|
57 | |||
58 | The files will be added to the repository at the next commit. |
|
58 | The files will be added to the repository at the next commit. | |
59 |
|
59 | |||
60 | If no names are given, add all files in the current directory and |
|
60 | If no names are given, add all files in the current directory and | |
61 | its subdirectories. |
|
61 | its subdirectories. | |
62 |
|
62 | |||
63 | addremove [options] [files ...]:: |
|
63 | addremove [options] [files ...]:: | |
64 | Add all new files and remove all missing files from the repository. |
|
64 | Add all new files and remove all missing files from the repository. | |
65 |
|
65 | |||
66 | New files are ignored if they match any of the patterns in .hgignore. As |
|
66 | New files are ignored if they match any of the patterns in .hgignore. As | |
67 | with add, these changes take effect at the next commit. |
|
67 | with add, these changes take effect at the next commit. | |
68 |
|
68 | |||
69 | annotate [-r <rev> -u -n -c] [files ...]:: |
|
69 | annotate [-r <rev> -u -n -c] [files ...]:: | |
70 | List changes in files, showing the revision id responsible for each line |
|
70 | List changes in files, showing the revision id responsible for each line | |
71 |
|
71 | |||
72 | This command is useful to discover who did a change or when a change took |
|
72 | This command is useful to discover who did a change or when a change took | |
73 | place. |
|
73 | place. | |
74 |
|
74 | |||
75 | options: |
|
75 | options: | |
76 | -I, --include <pat> include names matching the given patterns |
|
76 | -I, --include <pat> include names matching the given patterns | |
77 | -X, --exclude <pat> exclude names matching the given patterns |
|
77 | -X, --exclude <pat> exclude names matching the given patterns | |
78 | -r, --revision <rev> annotate the specified revision |
|
78 | -r, --revision <rev> annotate the specified revision | |
79 | -u, --user list the author |
|
79 | -u, --user list the author | |
80 | -c, --changeset list the changeset |
|
80 | -c, --changeset list the changeset | |
81 | -n, --number list the revision number (default) |
|
81 | -n, --number list the revision number (default) | |
82 |
|
82 | |||
83 | cat <file> [revision]:: |
|
83 | cat <file> [revision]:: | |
84 | Output to stdout the given revision for the specified file. |
|
84 | Output to stdout the given revision for the specified file. | |
85 |
|
85 | |||
86 | If no revision is given then the tip is used. |
|
86 | If no revision is given then the tip is used. | |
87 |
|
87 | |||
88 | clone [-U] <source> [dest]:: |
|
88 | clone [-U] <source> [dest]:: | |
89 | Create a copy of an existing repository in a new directory. |
|
89 | Create a copy of an existing repository in a new directory. | |
90 |
|
90 | |||
91 | If no destination directory name is specified, it defaults to the |
|
91 | If no destination directory name is specified, it defaults to the | |
92 | basename of the source. |
|
92 | basename of the source. | |
93 |
|
93 | |||
94 | The source is added to the new repository's .hg/hgrc file to be used in |
|
94 | The source is added to the new repository's .hg/hgrc file to be used in | |
95 | future pulls. |
|
95 | future pulls. | |
96 |
|
96 | |||
97 | For efficiency, hardlinks are used for cloning whenever the |
|
97 | For efficiency, hardlinks are used for cloning whenever the | |
98 | source and destination are on the same filesystem. |
|
98 | source and destination are on the same filesystem. | |
99 |
|
99 | |||
100 | options: |
|
100 | options: | |
101 | -U, --noupdate do not update the new working directory |
|
101 | -U, --noupdate do not update the new working directory | |
102 |
|
102 | |||
103 | commit [options] [files...]:: |
|
103 | commit [options] [files...]:: | |
104 | Commit changes to the given files into the repository. |
|
104 | Commit changes to the given files into the repository. | |
105 |
|
105 | |||
106 | If a list of files is omitted, all changes reported by "hg status" |
|
106 | If a list of files is omitted, all changes reported by "hg status" | |
107 | from the root of the repository will be commited. |
|
107 | from the root of the repository will be commited. | |
108 |
|
108 | |||
109 | The HGEDITOR or EDITOR environment variables are used to start an |
|
109 | The HGEDITOR or EDITOR environment variables are used to start an | |
110 | editor to add a commit comment. |
|
110 | editor to add a commit comment. | |
111 |
|
111 | |||
112 | Options: |
|
112 | Options: | |
113 |
|
113 | |||
114 | -A, --addremove run addremove during commit |
|
114 | -A, --addremove run addremove during commit | |
115 | -I, --include <pat> include names matching the given patterns |
|
115 | -I, --include <pat> include names matching the given patterns | |
116 | -X, --exclude <pat> exclude names matching the given patterns |
|
116 | -X, --exclude <pat> exclude names matching the given patterns | |
117 | -m, --message <text> use <text> as commit message |
|
117 | -m, --message <text> use <text> as commit message | |
118 | -l, --logfile <file> show the commit message for the given file |
|
118 | -l, --logfile <file> show the commit message for the given file | |
119 | -d, --date <datecode> record datecode as commit date |
|
119 | -d, --date <datecode> record datecode as commit date | |
120 | -u, --user <user> record user as commiter |
|
120 | -u, --user <user> record user as commiter | |
121 |
|
121 | |||
122 | aliases: ci |
|
122 | aliases: ci | |
123 |
|
123 | |||
124 | copy <source> <dest>:: |
|
124 | copy <source> <dest>:: | |
125 | Mark <dest> file as a copy or rename of a <source> one |
|
125 | Mark <dest> file as a copy or rename of a <source> one | |
126 |
|
126 | |||
127 | This command takes effect for the next commit. |
|
127 | This command takes effect for the next commit. | |
128 |
|
128 | |||
129 | diff [-r revision] [-r revision] [files ...]:: |
|
129 | diff [-r revision] [-r revision] [files ...]:: | |
130 | Show differences between revisions for the specified files. |
|
130 | Show differences between revisions for the specified files. | |
131 |
|
131 | |||
132 | Differences between files are shown using the unified diff format. |
|
132 | Differences between files are shown using the unified diff format. | |
133 |
|
133 | |||
134 | When two revision arguments are given, then changes are shown |
|
134 | When two revision arguments are given, then changes are shown | |
135 | between those revisions. If only one revision is specified then |
|
135 | between those revisions. If only one revision is specified then | |
136 | that revision is compared to the working directory, and, when no |
|
136 | that revision is compared to the working directory, and, when no | |
137 | revisions are specified, the working directory files are compared |
|
137 | revisions are specified, the working directory files are compared | |
138 | to its parent. |
|
138 | to its parent. | |
139 |
|
139 | |||
140 | options: |
|
140 | options: | |
141 | -I, --include <pat> include names matching the given patterns |
|
141 | -I, --include <pat> include names matching the given patterns | |
142 | -X, --exclude <pat> exclude names matching the given patterns |
|
142 | -X, --exclude <pat> exclude names matching the given patterns | |
143 |
|
143 | |||
144 | export [-o filespec] [revision] ...:: |
|
144 | export [-o filespec] [revision] ...:: | |
145 | Print the changeset header and diffs for one or more revisions. |
|
145 | Print the changeset header and diffs for one or more revisions. | |
146 |
|
146 | |||
147 | The information shown in the changeset header is: author, |
|
147 | The information shown in the changeset header is: author, | |
148 | changeset hash, parent and commit comment. |
|
148 | changeset hash, parent and commit comment. | |
149 |
|
149 | |||
150 | Output may be to a file, in which case the name of the file is |
|
150 | Output may be to a file, in which case the name of the file is | |
151 | given using a format string. The formatting rules are as follows: |
|
151 | given using a format string. The formatting rules are as follows: | |
152 |
|
152 | |||
153 | %% literal "%" character |
|
153 | %% literal "%" character | |
154 | %H changeset hash (40 bytes of hexadecimal) |
|
154 | %H changeset hash (40 bytes of hexadecimal) | |
155 | %N number of patches being generated |
|
155 | %N number of patches being generated | |
156 | %R changeset revision number |
|
156 | %R changeset revision number | |
157 | %b basename of the exporting repository |
|
157 | %b basename of the exporting repository | |
158 | %h short-form changeset hash (12 bytes of hexadecimal) |
|
158 | %h short-form changeset hash (12 bytes of hexadecimal) | |
159 | %n zero-padded sequence number, starting at 1 |
|
159 | %n zero-padded sequence number, starting at 1 | |
160 | %r zero-padded changeset revision number |
|
160 | %r zero-padded changeset revision number | |
161 |
|
161 | |||
162 | Options: |
|
162 | Options: | |
163 |
|
163 | |||
164 | -o, --output <filespec> print output to file with formatted named |
|
164 | -o, --output <filespec> print output to file with formatted named | |
165 |
|
165 | |||
166 | forget [options] [files]:: |
|
166 | forget [options] [files]:: | |
167 | Undo an 'hg add' scheduled for the next commit. |
|
167 | Undo an 'hg add' scheduled for the next commit. | |
168 |
|
168 | |||
169 | options: |
|
169 | options: | |
170 | -I, --include <pat> include names matching the given patterns |
|
170 | -I, --include <pat> include names matching the given patterns | |
171 | -X, --exclude <pat> exclude names matching the given patterns |
|
171 | -X, --exclude <pat> exclude names matching the given patterns | |
172 |
|
172 | |||
173 | heads:: |
|
173 | heads:: | |
174 | Show all repository head changesets. |
|
174 | Show all repository head changesets. | |
175 |
|
175 | |||
176 | Repository "heads" are changesets that don't have children |
|
176 | Repository "heads" are changesets that don't have children | |
177 | changesets. They are where development generally takes place and |
|
177 | changesets. They are where development generally takes place and | |
178 | are the usual targets for update and merge operations. |
|
178 | are the usual targets for update and merge operations. | |
179 |
|
179 | |||
180 | identify:: |
|
180 | identify:: | |
181 | Print a short summary of the current state of the repo. |
|
181 | Print a short summary of the current state of the repo. | |
182 |
|
182 | |||
183 | This summary identifies the repository state using one or two parent |
|
183 | This summary identifies the repository state using one or two parent | |
184 | hash identifiers, followed by a "+" if there are uncommitted changes |
|
184 | hash identifiers, followed by a "+" if there are uncommitted changes | |
185 | in the working directory, followed by a list of tags for this revision. |
|
185 | in the working directory, followed by a list of tags for this revision. | |
186 |
|
186 | |||
187 | aliases: id |
|
187 | aliases: id | |
188 |
|
188 | |||
189 | import [-p <n> -b <base> -q] <patches>:: |
|
189 | import [-p <n> -b <base> -q] <patches>:: | |
190 | Import a list of patches and commit them individually. |
|
190 | Import a list of patches and commit them individually. | |
191 |
|
191 | |||
192 | options: |
|
192 | options: | |
193 | -p, --strip <n> directory strip option for patch. This has the same |
|
193 | -p, --strip <n> directory strip option for patch. This has the same | |
194 | meaning as the correnponding patch option |
|
194 | meaning as the correnponding patch option | |
195 | -b <path> base directory to read patches from |
|
195 | -b <path> base directory to read patches from | |
196 |
|
196 | |||
197 | aliases: patch |
|
197 | aliases: patch | |
198 |
|
198 | |||
199 | incoming [source]:: |
|
199 | incoming [source]:: | |
200 | Show new changesets found in the specified repo or the default |
|
200 | Show new changesets found in the specified repo or the default | |
201 | pull repo. These are the changesets that would be pulled if a pull |
|
201 | pull repo. These are the changesets that would be pulled if a pull | |
202 | was requested. |
|
202 | was requested. | |
203 |
|
203 | |||
204 | Currently only local repositories are supported. |
|
204 | Currently only local repositories are supported. | |
205 |
|
205 | |||
206 | aliases: in |
|
206 | aliases: in | |
207 |
|
207 | |||
208 | init [dest]:: |
|
208 | init [dest]:: | |
209 | Initialize a new repository in the given directory. If the given |
|
209 | Initialize a new repository in the given directory. If the given | |
210 | directory does not exist, it is created. |
|
210 | directory does not exist, it is created. | |
211 |
|
211 | |||
212 | If no directory is given, the current directory is used. |
|
212 | If no directory is given, the current directory is used. | |
213 |
|
213 | |||
214 | locate [options] [files]:: |
|
214 | locate [options] [files]:: | |
215 | Print all files under Mercurial control whose names match the |
|
215 | Print all files under Mercurial control whose names match the | |
216 | given patterns. |
|
216 | given patterns. | |
217 |
|
217 | |||
218 | This command searches the current directory and its |
|
218 | This command searches the current directory and its | |
219 | subdirectories. To search an entire repository, move to the root |
|
219 | subdirectories. To search an entire repository, move to the root | |
220 | of the repository. |
|
220 | of the repository. | |
221 |
|
221 | |||
222 | If no patterns are given to match, this command prints all file |
|
222 | If no patterns are given to match, this command prints all file | |
223 | names. |
|
223 | names. | |
224 |
|
224 | |||
225 | If you want to feed the output of this command into the "xargs" |
|
225 | If you want to feed the output of this command into the "xargs" | |
226 | command, use the "-0" option to both this command and "xargs". |
|
226 | command, use the "-0" option to both this command and "xargs". | |
227 | This will avoid the problem of "xargs" treating single filenames |
|
227 | This will avoid the problem of "xargs" treating single filenames | |
228 | that contain white space as multiple file names. |
|
228 | that contain white space as multiple file names. | |
229 |
|
229 | |||
230 | options: |
|
230 | options: | |
231 |
|
231 | |||
232 | -0, --print0 end filenames with NUL, for use with xargs |
|
232 | -0, --print0 end filenames with NUL, for use with xargs | |
233 | -f, --fullpath print complete paths from the filesystem root |
|
233 | -f, --fullpath print complete paths from the filesystem root | |
234 | -I, --include <pat> include names matching the given patterns |
|
234 | -I, --include <pat> include names matching the given patterns | |
235 | -r, --rev <rev> search the repository as it stood at rev |
|
235 | -r, --rev <rev> search the repository as it stood at rev | |
236 | -X, --exclude <pat> exclude names matching the given patterns |
|
236 | -X, --exclude <pat> exclude names matching the given patterns | |
237 |
|
237 | |||
238 | log [-r revision ...] [-p] [file]:: |
|
238 | log [-r revision ...] [-p] [file]:: | |
239 | Print the revision history of the specified file or the entire project. |
|
239 | Print the revision history of the specified file or the entire project. | |
240 |
|
240 | |||
241 | By default this command outputs: changeset id and hash, tags, |
|
241 | By default this command outputs: changeset id and hash, tags, | |
242 | parents, user, date and time, and a summary for each commit. The |
|
242 | parents, user, date and time, and a summary for each commit. The | |
243 | -v switch adds some more detail, such as changed files, manifest |
|
243 | -v switch adds some more detail, such as changed files, manifest | |
244 | hashes or message signatures. |
|
244 | hashes or message signatures. | |
245 |
|
245 | |||
246 | options: |
|
246 | options: | |
247 | -r, --rev <A>, ... When a revision argument is given, only this file or |
|
247 | -r, --rev <A>, ... When a revision argument is given, only this file or | |
248 | changelog revision is displayed. With two revision |
|
248 | changelog revision is displayed. With two revision | |
249 | arguments all revisions in this range are listed. |
|
249 | arguments all revisions in this range are listed. | |
250 | Additional revision arguments may be given repeating |
|
250 | Additional revision arguments may be given repeating | |
251 | the above cycle. |
|
251 | the above cycle. | |
252 | -p, --patch show patch |
|
252 | -p, --patch show patch | |
253 |
|
253 | |||
254 | aliases: history |
|
254 | aliases: history | |
255 |
|
255 | |||
256 | manifest [revision]:: |
|
256 | manifest [revision]:: | |
257 | Print a list of version controlled files for the given revision. |
|
257 | Print a list of version controlled files for the given revision. | |
258 |
|
258 | |||
259 | The manifest is the list of files being version controlled. If no revision |
|
259 | The manifest is the list of files being version controlled. If no revision | |
260 | is given then the tip is used. |
|
260 | is given then the tip is used. | |
261 |
|
261 | |||
262 | outgoing [dest]:: |
|
262 | outgoing [dest]:: | |
263 | Show changesets not found in the specified destination repo or the |
|
263 | Show changesets not found in the specified destination repo or the | |
264 | default push repo. These are the changesets that would be pushed |
|
264 | default push repo. These are the changesets that would be pushed | |
265 | if a push was requested. |
|
265 | if a push was requested. | |
266 |
|
266 | |||
267 | aliases: out |
|
267 | aliases: out | |
268 |
|
268 | |||
269 | parents:: |
|
269 | parents:: | |
270 | Print the working directory's parent revisions. |
|
270 | Print the working directory's parent revisions. | |
271 |
|
271 | |||
272 | paths [NAME]:: |
|
272 | paths [NAME]:: | |
273 | Show definition of symbolic path name NAME. If no name is given, show |
|
273 | Show definition of symbolic path name NAME. If no name is given, show | |
274 | definition of available names. |
|
274 | definition of available names. | |
275 |
|
275 | |||
276 | Path names are defined in the [paths] section of /etc/mercurial/hgrc |
|
276 | Path names are defined in the [paths] section of /etc/mercurial/hgrc | |
277 | and $HOME/.hgrc. If run inside a repository, .hg/hgrc is used, too. |
|
277 | and $HOME/.hgrc. If run inside a repository, .hg/hgrc is used, too. | |
278 |
|
278 | |||
279 | pull <repository path>:: |
|
279 | pull <repository path>:: | |
280 | Pull changes from a remote repository to a local one. |
|
280 | Pull changes from a remote repository to a local one. | |
281 |
|
281 | |||
282 | This finds all changes from the repository at the specified path |
|
282 | This finds all changes from the repository at the specified path | |
283 | or URL and adds them to the local repository. By default, this |
|
283 | or URL and adds them to the local repository. By default, this | |
284 | does not update the copy of the project in the working directory. |
|
284 | does not update the copy of the project in the working directory. | |
285 |
|
285 | |||
|
286 | Valid URLs are of the form: | |||
|
287 | ||||
|
288 | local/filesystem/path | |||
|
289 | http://[user@]host[:port][/path] | |||
|
290 | https://[user@]host[:port][/path] | |||
|
291 | ssh://[user@]host[:port][/path] | |||
|
292 | ||||
|
293 | SSH requires an accessible shell account on the destination | |||
|
294 | machine and a copy of hg in the remote path. | |||
|
295 | ||||
286 | options: |
|
296 | options: | |
287 | -u, --update update the working directory to tip after pull |
|
297 | -u, --update update the working directory to tip after pull | |
288 |
|
298 | |||
289 | push <destination>:: |
|
299 | push <destination>:: | |
290 | Push changes from the local repository to the given destination. |
|
300 | Push changes from the local repository to the given destination. | |
291 |
|
301 | |||
292 | This is the symmetrical operation for pull. It helps to move |
|
302 | This is the symmetrical operation for pull. It helps to move | |
293 | changes from the current repository to a different one. If the |
|
303 | changes from the current repository to a different one. If the | |
294 | destination is local this is identical to a pull in that directory |
|
304 | destination is local this is identical to a pull in that directory | |
295 | from the current one. |
|
305 | from the current one. | |
296 |
|
306 | |||
297 | The other currently available push method is SSH. This requires an |
|
307 | By default, push will refuse to run if it detects the result would | |
298 | accessible shell account on the destination machine and a copy of |
|
308 | increase the number of remote heads. This generally indicates the | |
299 | hg in the remote path. Destinations are specified in the following |
|
309 | the client has forgotten to sync and merge before pushing. | |
300 | form: |
|
310 | ||
|
311 | Valid URLs are of the form: | |||
301 |
|
312 | |||
302 | ssh://[user@]host[:port]/path |
|
313 | local/filesystem/path | |
|
314 | ssh://[user@]host[:port][/path] | |||
|
315 | ||||
|
316 | SSH requires an accessible shell account on the destination | |||
|
317 | machine and a copy of hg in the remote path. | |||
|
318 | ||||
|
319 | options: | |||
|
320 | ||||
|
321 | -f, --force force update | |||
|
322 | -e, --ssh specify ssh command to use | |||
|
323 | --remotecmd specify hg command to run on the remote side | |||
303 |
|
324 | |||
304 | rawcommit [-p -d -u -F -m -l]:: |
|
325 | rawcommit [-p -d -u -F -m -l]:: | |
305 | Lowlevel commit, for use in helper scripts. |
|
326 | Lowlevel commit, for use in helper scripts. | |
306 |
|
327 | |||
307 | This command is not intended to be used by normal users, as it is |
|
328 | This command is not intended to be used by normal users, as it is | |
308 | primarily useful for importing from other SCMs. |
|
329 | primarily useful for importing from other SCMs. | |
309 |
|
330 | |||
310 | recover:: |
|
331 | recover:: | |
311 | Recover from an interrupted commit or pull. |
|
332 | Recover from an interrupted commit or pull. | |
312 |
|
333 | |||
313 | This command tries to fix the repository status after an interrupted |
|
334 | This command tries to fix the repository status after an interrupted | |
314 | operation. It should only be necessary when Mercurial suggests it. |
|
335 | operation. It should only be necessary when Mercurial suggests it. | |
315 |
|
336 | |||
316 | remove [files ...]:: |
|
337 | remove [files ...]:: | |
317 | Schedule the indicated files for removal from the repository. |
|
338 | Schedule the indicated files for removal from the repository. | |
318 |
|
339 | |||
319 | This command shedules the files to be removed at the next commit. |
|
340 | This command shedules the files to be removed at the next commit. | |
320 | This only removes files from the current branch, not from the |
|
341 | This only removes files from the current branch, not from the | |
321 | entire project history. |
|
342 | entire project history. | |
322 |
|
343 | |||
323 | aliases: rm |
|
344 | aliases: rm | |
324 |
|
345 | |||
325 | revert [names ...]:: |
|
346 | revert [names ...]:: | |
326 | Revert any uncommitted modifications made to the named files or |
|
347 | Revert any uncommitted modifications made to the named files or | |
327 | directories. This restores the contents of the affected files to |
|
348 | directories. This restores the contents of the affected files to | |
328 | an unmodified state. |
|
349 | an unmodified state. | |
329 |
|
350 | |||
330 | If a file has been deleted, it is recreated. If the executable |
|
351 | If a file has been deleted, it is recreated. If the executable | |
331 | mode of a file was changed, it is reset. |
|
352 | mode of a file was changed, it is reset. | |
332 |
|
353 | |||
333 | If a directory is given, all files in that directory and its |
|
354 | If a directory is given, all files in that directory and its | |
334 | subdirectories are reverted. |
|
355 | subdirectories are reverted. | |
335 |
|
356 | |||
336 | If no arguments are given, all files in the current directory and |
|
357 | If no arguments are given, all files in the current directory and | |
337 | its subdirectories are reverted. |
|
358 | its subdirectories are reverted. | |
338 |
|
359 | |||
339 | options: |
|
360 | options: | |
340 | -r, --rev <rev> revision to revert to |
|
361 | -r, --rev <rev> revision to revert to | |
341 | -n, --nonrecursive do not recurse into subdirectories |
|
362 | -n, --nonrecursive do not recurse into subdirectories | |
342 |
|
363 | |||
343 | root:: |
|
364 | root:: | |
344 | Print the root directory of the current repository. |
|
365 | Print the root directory of the current repository. | |
345 |
|
366 | |||
346 | serve [options]:: |
|
367 | serve [options]:: | |
347 | Start a local HTTP repository browser and pull server. |
|
368 | Start a local HTTP repository browser and pull server. | |
348 |
|
369 | |||
349 | By default, the server logs accesses to stdout and errors to |
|
370 | By default, the server logs accesses to stdout and errors to | |
350 | stderr. Use the "-A" and "-E" options to log to files. |
|
371 | stderr. Use the "-A" and "-E" options to log to files. | |
351 |
|
372 | |||
352 | options: |
|
373 | options: | |
353 | -A, --accesslog <file> name of access log file to write to |
|
374 | -A, --accesslog <file> name of access log file to write to | |
354 | -E, --errorlog <file> name of error log file to write to |
|
375 | -E, --errorlog <file> name of error log file to write to | |
355 | -a, --address <addr> address to use |
|
376 | -a, --address <addr> address to use | |
356 | -p, --port <n> port to use (default: 8000) |
|
377 | -p, --port <n> port to use (default: 8000) | |
357 | -n, --name <name> name to show in web pages (default: working dir) |
|
378 | -n, --name <name> name to show in web pages (default: working dir) | |
358 | -t, --templatedir <path> web templates to use |
|
379 | -t, --templatedir <path> web templates to use | |
359 | -6, --ipv6 use IPv6 in addition to IPv4 |
|
380 | -6, --ipv6 use IPv6 in addition to IPv4 | |
360 |
|
381 | |||
361 | status [options] [files]:: |
|
382 | status [options] [files]:: | |
362 | Show changed files in the working directory. If no names are |
|
383 | Show changed files in the working directory. If no names are | |
363 | given, all files are shown. Otherwise, only files matching the |
|
384 | given, all files are shown. Otherwise, only files matching the | |
364 | given names are shown. |
|
385 | given names are shown. | |
365 |
|
386 | |||
366 | The codes used to show the status of files are: |
|
387 | The codes used to show the status of files are: | |
367 |
|
388 | |||
368 | M = changed |
|
389 | M = changed | |
369 | A = added |
|
390 | A = added | |
370 | R = removed |
|
391 | R = removed | |
371 | ? = not tracked |
|
392 | ? = not tracked | |
372 |
|
393 | |||
373 | options: |
|
394 | options: | |
374 |
|
395 | |||
375 | -m, --modified show only modified files |
|
396 | -m, --modified show only modified files | |
376 | -a, --added show only added files |
|
397 | -a, --added show only added files | |
377 | -r, --removed show only removed files |
|
398 | -r, --removed show only removed files | |
378 | -u, --unknown show only unknown (not tracked) files |
|
399 | -u, --unknown show only unknown (not tracked) files | |
379 | -I, --include <pat> include names matching the given patterns |
|
400 | -I, --include <pat> include names matching the given patterns | |
380 | -X, --exclude <pat> exclude names matching the given patterns |
|
401 | -X, --exclude <pat> exclude names matching the given patterns | |
381 |
|
402 | |||
382 | tag [-l -m <text> -d <datecode> -u <user>] <name> [revision]:: |
|
403 | tag [-l -m <text> -d <datecode> -u <user>] <name> [revision]:: | |
383 | Name a particular revision using <name>. |
|
404 | Name a particular revision using <name>. | |
384 |
|
405 | |||
385 | Tags are used to name particular revisions of the repository and are |
|
406 | Tags are used to name particular revisions of the repository and are | |
386 | very useful to compare different revision, to go back to significant |
|
407 | very useful to compare different revision, to go back to significant | |
387 | earlier versions or to mark branch points as releases, etc. |
|
408 | earlier versions or to mark branch points as releases, etc. | |
388 |
|
409 | |||
389 | If no revision is given, the tip is used. |
|
410 | If no revision is given, the tip is used. | |
390 |
|
411 | |||
391 | To facilitate version control, distribution, and merging of tags, |
|
412 | To facilitate version control, distribution, and merging of tags, | |
392 | they are stored as a file named ".hgtags" which is managed |
|
413 | they are stored as a file named ".hgtags" which is managed | |
393 | similarly to other project files and can be hand-edited if |
|
414 | similarly to other project files and can be hand-edited if | |
394 | necessary. |
|
415 | necessary. | |
395 |
|
416 | |||
396 | options: |
|
417 | options: | |
397 | -l, --local make the tag local |
|
418 | -l, --local make the tag local | |
398 | -m, --message <text> message for tag commit log entry |
|
419 | -m, --message <text> message for tag commit log entry | |
399 | -d, --date <datecode> datecode for commit |
|
420 | -d, --date <datecode> datecode for commit | |
400 | -u, --user <user> user for commit |
|
421 | -u, --user <user> user for commit | |
401 |
|
422 | |||
402 | Note: Local tags are not version-controlled or distributed and are |
|
423 | Note: Local tags are not version-controlled or distributed and are | |
403 | stored in the .hg/localtags file. If there exists a local tag and |
|
424 | stored in the .hg/localtags file. If there exists a local tag and | |
404 | a public tag with the same name, local tag is used. |
|
425 | a public tag with the same name, local tag is used. | |
405 |
|
426 | |||
406 | tags:: |
|
427 | tags:: | |
407 | List the repository tags. |
|
428 | List the repository tags. | |
408 |
|
429 | |||
409 | This lists both regular and local tags. |
|
430 | This lists both regular and local tags. | |
410 |
|
431 | |||
411 | tip:: |
|
432 | tip:: | |
412 | Show the tip revision. |
|
433 | Show the tip revision. | |
413 |
|
434 | |||
414 | undo:: |
|
435 | undo:: | |
415 | Undo the last commit or pull transaction. |
|
436 | Undo the last commit or pull transaction. | |
416 |
|
437 | |||
417 | Roll back the last pull or commit transaction on the |
|
438 | Roll back the last pull or commit transaction on the | |
418 | repository, restoring the project to its earlier state. |
|
439 | repository, restoring the project to its earlier state. | |
419 |
|
440 | |||
420 | This command should be used with care. There is only one level of |
|
441 | This command should be used with care. There is only one level of | |
421 | undo and there is no redo. |
|
442 | undo and there is no redo. | |
422 |
|
443 | |||
423 | This command is not intended for use on public repositories. Once |
|
444 | This command is not intended for use on public repositories. Once | |
424 | a change is visible for pull by other users, undoing it locally is |
|
445 | a change is visible for pull by other users, undoing it locally is | |
425 | ineffective. |
|
446 | ineffective. | |
426 |
|
447 | |||
427 | update [-m -C] [revision]:: |
|
448 | update [-m -C] [revision]:: | |
428 | Update the working directory to the specified revision. |
|
449 | Update the working directory to the specified revision. | |
429 |
|
450 | |||
430 | By default, update will refuse to run if doing so would require |
|
451 | By default, update will refuse to run if doing so would require | |
431 | merging or discarding local changes. |
|
452 | merging or discarding local changes. | |
432 |
|
453 | |||
433 | With the -m option, a merge will be performed. |
|
454 | With the -m option, a merge will be performed. | |
434 |
|
455 | |||
435 | With the -C option, local changes will be lost. |
|
456 | With the -C option, local changes will be lost. | |
436 |
|
457 | |||
437 | options: |
|
458 | options: | |
438 | -m, --merge allow merging of branches |
|
459 | -m, --merge allow merging of branches | |
439 | -C, --clean overwrite locally modified files |
|
460 | -C, --clean overwrite locally modified files | |
440 |
|
461 | |||
441 | aliases: up checkout co |
|
462 | aliases: up checkout co | |
442 |
|
463 | |||
443 | verify:: |
|
464 | verify:: | |
444 | Verify the integrity of the current repository. |
|
465 | Verify the integrity of the current repository. | |
445 |
|
466 | |||
446 | This will perform an extensive check of the repository's |
|
467 | This will perform an extensive check of the repository's | |
447 | integrity, validating the hashes and checksums of each entry in |
|
468 | integrity, validating the hashes and checksums of each entry in | |
448 | the changelog, manifest, and tracked files, as well as the |
|
469 | the changelog, manifest, and tracked files, as well as the | |
449 | integrity of their crosslinks and indices. |
|
470 | integrity of their crosslinks and indices. | |
450 |
|
471 | |||
451 | FILE NAME PATTERNS |
|
472 | FILE NAME PATTERNS | |
452 | ------------------ |
|
473 | ------------------ | |
453 |
|
474 | |||
454 | Mercurial accepts several notations for identifying one or more |
|
475 | Mercurial accepts several notations for identifying one or more | |
455 | file at a time. |
|
476 | file at a time. | |
456 |
|
477 | |||
457 | By default, Mercurial treats file names as shell-style extended |
|
478 | By default, Mercurial treats file names as shell-style extended | |
458 | glob patterns. |
|
479 | glob patterns. | |
459 |
|
480 | |||
460 | Alternate pattern notations must be specified explicitly. |
|
481 | Alternate pattern notations must be specified explicitly. | |
461 |
|
482 | |||
462 | To use a plain path name without any pattern matching, start a |
|
483 | To use a plain path name without any pattern matching, start a | |
463 | name with "path:". These path names must match completely, from |
|
484 | name with "path:". These path names must match completely, from | |
464 | the root of the current repository. |
|
485 | the root of the current repository. | |
465 |
|
486 | |||
466 | To use an extended glob, start a name with "glob:". Globs are |
|
487 | To use an extended glob, start a name with "glob:". Globs are | |
467 | rooted at the current directory; a glob such as "*.c" will match |
|
488 | rooted at the current directory; a glob such as "*.c" will match | |
468 | files ending in ".c" in the current directory only. |
|
489 | files ending in ".c" in the current directory only. | |
469 |
|
490 | |||
470 | The supported glob syntax extensions are "**" to match any string |
|
491 | The supported glob syntax extensions are "**" to match any string | |
471 | across path separators, and "{a,b}" to mean "a or b". |
|
492 | across path separators, and "{a,b}" to mean "a or b". | |
472 |
|
493 | |||
473 | To use a Perl/Python regular expression, start a name with "re:". |
|
494 | To use a Perl/Python regular expression, start a name with "re:". | |
474 | Regexp pattern matching is anchored at the root of the repository. |
|
495 | Regexp pattern matching is anchored at the root of the repository. | |
475 |
|
496 | |||
476 | Plain examples: |
|
497 | Plain examples: | |
477 |
|
498 | |||
478 | path:foo/bar a name bar in a directory named foo in the root of |
|
499 | path:foo/bar a name bar in a directory named foo in the root of | |
479 | the repository |
|
500 | the repository | |
480 | path:path:name a file or directory named "path:name" |
|
501 | path:path:name a file or directory named "path:name" | |
481 |
|
502 | |||
482 | Glob examples: |
|
503 | Glob examples: | |
483 |
|
504 | |||
484 | glob:*.c any name ending in ".c" in the current directory |
|
505 | glob:*.c any name ending in ".c" in the current directory | |
485 | *.c any name ending in ".c" in the current directory |
|
506 | *.c any name ending in ".c" in the current directory | |
486 | **.c any name ending in ".c" in the current directory, or |
|
507 | **.c any name ending in ".c" in the current directory, or | |
487 | any subdirectory |
|
508 | any subdirectory | |
488 | foo/*.c any name ending in ".c" in the directory foo |
|
509 | foo/*.c any name ending in ".c" in the directory foo | |
489 | foo/**.c any name ending in ".c" in the directory foo, or any |
|
510 | foo/**.c any name ending in ".c" in the directory foo, or any | |
490 | subdirectory |
|
511 | subdirectory | |
491 |
|
512 | |||
492 | Regexp examples: |
|
513 | Regexp examples: | |
493 |
|
514 | |||
494 | re:.*\.c$ any name ending in ".c", anywhere in the repsitory |
|
515 | re:.*\.c$ any name ending in ".c", anywhere in the repsitory | |
495 |
|
516 | |||
496 |
|
517 | |||
497 | SPECIFYING SINGLE REVISIONS |
|
518 | SPECIFYING SINGLE REVISIONS | |
498 | --------------------------- |
|
519 | --------------------------- | |
499 |
|
520 | |||
500 | Mercurial accepts several notations for identifying individual |
|
521 | Mercurial accepts several notations for identifying individual | |
501 | revisions. |
|
522 | revisions. | |
502 |
|
523 | |||
503 | A plain integer is treated as a revision number. Negative |
|
524 | A plain integer is treated as a revision number. Negative | |
504 | integers are treated as offsets from the tip, with -1 denoting the |
|
525 | integers are treated as offsets from the tip, with -1 denoting the | |
505 | tip. |
|
526 | tip. | |
506 |
|
527 | |||
507 | A 40-digit hexadecimal string is treated as a unique revision |
|
528 | A 40-digit hexadecimal string is treated as a unique revision | |
508 | identifier. |
|
529 | identifier. | |
509 |
|
530 | |||
510 | A hexadecimal string less than 40 characters long is treated as a |
|
531 | A hexadecimal string less than 40 characters long is treated as a | |
511 | unique revision identifier, and referred to as a short-form |
|
532 | unique revision identifier, and referred to as a short-form | |
512 | identifier. A short-form identifier is only valid if it is the |
|
533 | identifier. A short-form identifier is only valid if it is the | |
513 | prefix of one full-length identifier. |
|
534 | prefix of one full-length identifier. | |
514 |
|
535 | |||
515 | Any other string is treated as a tag name, which is a symbolic |
|
536 | Any other string is treated as a tag name, which is a symbolic | |
516 | name associated with a revision identifier. Tag names may not |
|
537 | name associated with a revision identifier. Tag names may not | |
517 | contain the ":" character. |
|
538 | contain the ":" character. | |
518 |
|
539 | |||
519 | The reserved name "tip" is a special tag that always identifies |
|
540 | The reserved name "tip" is a special tag that always identifies | |
520 | the most recent revision. |
|
541 | the most recent revision. | |
521 |
|
542 | |||
522 | SPECIFYING MULTIPLE REVISIONS |
|
543 | SPECIFYING MULTIPLE REVISIONS | |
523 | ----------------------------- |
|
544 | ----------------------------- | |
524 |
|
545 | |||
525 | When Mercurial accepts more than one revision, they may be |
|
546 | When Mercurial accepts more than one revision, they may be | |
526 | specified individually, or provided as a continuous range, |
|
547 | specified individually, or provided as a continuous range, | |
527 | separated by the ":" character. |
|
548 | separated by the ":" character. | |
528 |
|
549 | |||
529 | The syntax of range notation is [BEGIN]:[END], where BEGIN and END |
|
550 | The syntax of range notation is [BEGIN]:[END], where BEGIN and END | |
530 | are revision identifiers. Both BEGIN and END are optional. If |
|
551 | are revision identifiers. Both BEGIN and END are optional. If | |
531 | BEGIN is not specified, it defaults to revision number 0. If END |
|
552 | BEGIN is not specified, it defaults to revision number 0. If END | |
532 | is not specified, it defaults to the tip. The range ":" thus |
|
553 | is not specified, it defaults to the tip. The range ":" thus | |
533 | means "all revisions". |
|
554 | means "all revisions". | |
534 |
|
555 | |||
535 | If BEGIN is greater than END, revisions are treated in reverse |
|
556 | If BEGIN is greater than END, revisions are treated in reverse | |
536 | order. |
|
557 | order. | |
537 |
|
558 | |||
538 | A range acts as a closed interval. This means that a range of 3:5 |
|
559 | A range acts as a closed interval. This means that a range of 3:5 | |
539 | gives 3, 4 and 5. Similarly, a range of 4:2 gives 4, 3, and 2. |
|
560 | gives 3, 4 and 5. Similarly, a range of 4:2 gives 4, 3, and 2. | |
540 |
|
561 | |||
541 | ENVIRONMENT VARIABLES |
|
562 | ENVIRONMENT VARIABLES | |
542 | --------------------- |
|
563 | --------------------- | |
543 |
|
564 | |||
544 | HGEDITOR:: |
|
565 | HGEDITOR:: | |
545 | This is the name of the editor to use when committing. Defaults to the |
|
566 | This is the name of the editor to use when committing. Defaults to the | |
546 | value of EDITOR. |
|
567 | value of EDITOR. | |
547 |
|
568 | |||
548 | (deprecated, use .hgrc) |
|
569 | (deprecated, use .hgrc) | |
549 |
|
570 | |||
550 | HGMERGE:: |
|
571 | HGMERGE:: | |
551 | An executable to use for resolving merge conflicts. The program |
|
572 | An executable to use for resolving merge conflicts. The program | |
552 | will be executed with three arguments: local file, remote file, |
|
573 | will be executed with three arguments: local file, remote file, | |
553 | ancestor file. |
|
574 | ancestor file. | |
554 |
|
575 | |||
555 | The default program is "hgmerge", which is a shell script provided |
|
576 | The default program is "hgmerge", which is a shell script provided | |
556 | by Mercurial with some sensible defaults. |
|
577 | by Mercurial with some sensible defaults. | |
557 |
|
578 | |||
558 | (deprecated, use .hgrc) |
|
579 | (deprecated, use .hgrc) | |
559 |
|
580 | |||
560 | HGUSER:: |
|
581 | HGUSER:: | |
561 | This is the string used for the author of a commit. |
|
582 | This is the string used for the author of a commit. | |
562 |
|
583 | |||
563 | (deprecated, use .hgrc) |
|
584 | (deprecated, use .hgrc) | |
564 |
|
585 | |||
565 | EMAIL:: |
|
586 | EMAIL:: | |
566 | If HGUSER is not set, this will be used as the author for a commit. |
|
587 | If HGUSER is not set, this will be used as the author for a commit. | |
567 |
|
588 | |||
568 | LOGNAME:: |
|
589 | LOGNAME:: | |
569 | If neither HGUSER nor EMAIL is set, LOGNAME will be used (with |
|
590 | If neither HGUSER nor EMAIL is set, LOGNAME will be used (with | |
570 | '@hostname' appended) as the author value for a commit. |
|
591 | '@hostname' appended) as the author value for a commit. | |
571 |
|
592 | |||
572 | EDITOR:: |
|
593 | EDITOR:: | |
573 | This is the name of the editor used in the hgmerge script. It will be |
|
594 | This is the name of the editor used in the hgmerge script. It will be | |
574 | used for commit messages if HGEDITOR isn't set. Defaults to 'vi'. |
|
595 | used for commit messages if HGEDITOR isn't set. Defaults to 'vi'. | |
575 |
|
596 | |||
576 | PYTHONPATH:: |
|
597 | PYTHONPATH:: | |
577 | This is used by Python to find imported modules and may need to be set |
|
598 | This is used by Python to find imported modules and may need to be set | |
578 | appropriately if Mercurial is not installed system-wide. |
|
599 | appropriately if Mercurial is not installed system-wide. | |
579 |
|
600 | |||
580 | FILES |
|
601 | FILES | |
581 | ----- |
|
602 | ----- | |
582 | .hgignore:: |
|
603 | .hgignore:: | |
583 | This file contains regular expressions (one per line) that describe file |
|
604 | This file contains regular expressions (one per line) that describe file | |
584 | names that should be ignored by hg. |
|
605 | names that should be ignored by hg. | |
585 |
|
606 | |||
586 | .hgtags:: |
|
607 | .hgtags:: | |
587 | This file contains changeset hash values and text tag names (one of each |
|
608 | This file contains changeset hash values and text tag names (one of each | |
588 | seperated by spaces) that correspond to tagged versions of the repository |
|
609 | seperated by spaces) that correspond to tagged versions of the repository | |
589 | contents. |
|
610 | contents. | |
590 |
|
611 | |||
591 | /etc/mercurial/hgrc, $HOME/.hgrc, .hg/hgrc:: |
|
612 | /etc/mercurial/hgrc, $HOME/.hgrc, .hg/hgrc:: | |
592 | This file contains defaults and configuration. Values in .hg/hgrc |
|
613 | This file contains defaults and configuration. Values in .hg/hgrc | |
593 | override those in $HOME/.hgrc, and these override settings made in the |
|
614 | override those in $HOME/.hgrc, and these override settings made in the | |
594 | global /etc/mercurial/hgrc configuration. See hgrc(5) for details of |
|
615 | global /etc/mercurial/hgrc configuration. See hgrc(5) for details of | |
595 | the contents and format of these files. |
|
616 | the contents and format of these files. | |
596 |
|
617 | |||
597 | BUGS |
|
618 | BUGS | |
598 | ---- |
|
619 | ---- | |
599 | Probably lots, please post them to the mailing list (See Resources below) |
|
620 | Probably lots, please post them to the mailing list (See Resources below) | |
600 | when you find them. |
|
621 | when you find them. | |
601 |
|
622 | |||
602 | SEE ALSO |
|
623 | SEE ALSO | |
603 | -------- |
|
624 | -------- | |
604 | hgrc(5) |
|
625 | hgrc(5) | |
605 |
|
626 | |||
606 | AUTHOR |
|
627 | AUTHOR | |
607 | ------ |
|
628 | ------ | |
608 | Written by Matt Mackall <mpm@selenic.com> |
|
629 | Written by Matt Mackall <mpm@selenic.com> | |
609 |
|
630 | |||
610 | RESOURCES |
|
631 | RESOURCES | |
611 | --------- |
|
632 | --------- | |
612 | http://selenic.com/mercurial[Main Web Site] |
|
633 | http://selenic.com/mercurial[Main Web Site] | |
613 |
|
634 | |||
614 | http://www.serpentine.com/mercurial[Wiki site] |
|
635 | http://www.serpentine.com/mercurial[Wiki site] | |
615 |
|
636 | |||
616 | http://selenic.com/hg[Source code repository] |
|
637 | http://selenic.com/hg[Source code repository] | |
617 |
|
638 | |||
618 | http://selenic.com/mailman/listinfo/mercurial[Mailing list] |
|
639 | http://selenic.com/mailman/listinfo/mercurial[Mailing list] | |
619 |
|
640 | |||
620 | COPYING |
|
641 | COPYING | |
621 | ------- |
|
642 | ------- | |
622 | Copyright (C) 2005 Matt Mackall. |
|
643 | Copyright (C) 2005 Matt Mackall. | |
623 | Free use of this software is granted under the terms of the GNU General |
|
644 | Free use of this software is granted under the terms of the GNU General | |
624 | Public License (GPL). |
|
645 | Public License (GPL). |
@@ -1,151 +1,153 | |||||
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 three files: |
|
18 | Mercurial reads configuration data from three files: | |
19 |
|
19 | |||
20 | /etc/mercurial/hgrc:: |
|
20 | /etc/mercurial/hgrc:: | |
21 | Options in this global configuration file apply to all Mercurial |
|
21 | Options in this global configuration file apply to all Mercurial | |
22 | commands executed by any user in any directory. |
|
22 | commands executed by any user in any directory. | |
23 |
|
23 | |||
24 | $HOME/.hgrc:: |
|
24 | $HOME/.hgrc:: | |
25 | Per-user configuration options that apply to all Mercurial commands, |
|
25 | Per-user configuration options that apply to all Mercurial commands, | |
26 | no matter from which directory they are run. Values in this file |
|
26 | no matter from which directory they are run. Values in this file | |
27 | override global settings. |
|
27 | override global settings. | |
28 |
|
28 | |||
29 | <repo>/.hg/hgrc:: |
|
29 | <repo>/.hg/hgrc:: | |
30 | Per-repository configuration options that only apply in a |
|
30 | Per-repository configuration options that only apply in a | |
31 | particular repository. This file is not version-controlled, and |
|
31 | particular repository. This file is not version-controlled, and | |
32 | will not get transferred during a "clone" operation. Values in |
|
32 | will not get transferred during a "clone" operation. Values in | |
33 | this file override global and per-user settings. |
|
33 | this file override global and per-user settings. | |
34 |
|
34 | |||
35 | SYNTAX |
|
35 | SYNTAX | |
36 | ------ |
|
36 | ------ | |
37 |
|
37 | |||
38 | A configuration file consists of sections, led by a "[section]" header |
|
38 | A configuration file consists of sections, led by a "[section]" header | |
39 | and followed by "name: value" entries; "name=value" is also accepted. |
|
39 | and followed by "name: value" entries; "name=value" is also accepted. | |
40 |
|
40 | |||
41 | [spam] |
|
41 | [spam] | |
42 | eggs=ham |
|
42 | eggs=ham | |
43 | green= |
|
43 | green= | |
44 | eggs |
|
44 | eggs | |
45 |
|
45 | |||
46 | Each line contains one entry. If the lines that follow are indented, |
|
46 | Each line contains one entry. If the lines that follow are indented, | |
47 | they are treated as continuations of that entry. |
|
47 | they are treated as continuations of that entry. | |
48 |
|
48 | |||
49 | Leading whitespace is removed from values. Empty lines are skipped. |
|
49 | Leading whitespace is removed from values. Empty lines are skipped. | |
50 |
|
50 | |||
51 | The optional values can contain format strings which refer to other |
|
51 | The optional values can contain format strings which refer to other | |
52 | values in the same section, or values in a special DEFAULT section. |
|
52 | values in the same section, or values in a special DEFAULT section. | |
53 |
|
53 | |||
54 | Lines beginning with "#" or ";" are ignored and may be used to provide |
|
54 | Lines beginning with "#" or ";" are ignored and may be used to provide | |
55 | comments. |
|
55 | comments. | |
56 |
|
56 | |||
57 | SECTIONS |
|
57 | SECTIONS | |
58 | -------- |
|
58 | -------- | |
59 |
|
59 | |||
60 | This section describes the different sections that may appear in a |
|
60 | This section describes the different sections that may appear in a | |
61 | Mercurial "hgrc" file, the purpose of each section, its possible |
|
61 | Mercurial "hgrc" file, the purpose of each section, its possible | |
62 | keys, and their possible values. |
|
62 | keys, and their possible values. | |
63 |
|
63 | |||
64 | hooks:: |
|
64 | hooks:: | |
65 | Commands that get automatically executed by various actions such as |
|
65 | Commands that get automatically executed by various actions such as | |
66 | starting or finishing a commit. |
|
66 | starting or finishing a commit. | |
67 | precommit;; |
|
67 | precommit;; | |
68 | Run before starting a commit. Exit status 0 allows the commit to |
|
68 | Run before starting a commit. Exit status 0 allows the commit to | |
69 | proceed. Non-zero status will cause the commit to fail. |
|
69 | proceed. Non-zero status will cause the commit to fail. | |
70 | commit;; |
|
70 | commit;; | |
71 | Run after a changeset has been created. Passed the ID of the newly |
|
71 | Run after a changeset has been created. Passed the ID of the newly | |
72 | created changeset. |
|
72 | created changeset. | |
|
73 | changegroup;; | |||
|
74 | Run after a changegroup has been added via push or pull. | |||
73 |
|
75 | |||
74 | http_proxy:: |
|
76 | http_proxy:: | |
75 | Used to access web-based Mercurial repositories through a HTTP |
|
77 | Used to access web-based Mercurial repositories through a HTTP | |
76 | proxy. |
|
78 | proxy. | |
77 | host;; |
|
79 | host;; | |
78 | Host name and (optional) port of the proxy server, for example |
|
80 | Host name and (optional) port of the proxy server, for example | |
79 | "myproxy:8000". |
|
81 | "myproxy:8000". | |
80 | user;; |
|
82 | user;; | |
81 | Optional. User name to authenticate with at the proxy server. |
|
83 | Optional. User name to authenticate with at the proxy server. | |
82 | passwd;; |
|
84 | passwd;; | |
83 | Optional. Password to authenticate with at the proxy server. |
|
85 | Optional. Password to authenticate with at the proxy server. | |
84 | no;; |
|
86 | no;; | |
85 | Optional. Comma-separated list of host names that should bypass |
|
87 | Optional. Comma-separated list of host names that should bypass | |
86 | the proxy. |
|
88 | the proxy. | |
87 |
|
89 | |||
88 | paths:: |
|
90 | paths:: | |
89 | Assigns symbolic names to repositories. The left side is the |
|
91 | Assigns symbolic names to repositories. The left side is the | |
90 | symbolic name, and the right gives the directory or URL that is the |
|
92 | symbolic name, and the right gives the directory or URL that is the | |
91 | location of the repository. |
|
93 | location of the repository. | |
92 |
|
94 | |||
93 | tags:: |
|
|||
94 | Tags that are local to a repository and not distributed or version |
|
|||
95 | controlled. The left side is the tag name, and the right is the |
|
|||
96 | ID of the changeset to identify. |
|
|||
97 |
|
||||
98 | ui:: |
|
95 | ui:: | |
99 | User interface controls. |
|
96 | User interface controls. | |
100 | debug;; |
|
97 | debug;; | |
101 | Print debugging information. True or False. Default is False. |
|
98 | Print debugging information. True or False. Default is False. | |
102 | editor;; |
|
99 | editor;; | |
103 | The editor to use during a commit. Default is $EDITOR or "vi". |
|
100 | The editor to use during a commit. Default is $EDITOR or "vi". | |
104 | interactive;; |
|
101 | interactive;; | |
105 | Allow to prompt the user. True or False. Default is True. |
|
102 | Allow to prompt the user. True or False. Default is True. | |
106 | merge;; |
|
103 | merge;; | |
107 | The conflict resolution program to use during a manual merge. |
|
104 | The conflict resolution program to use during a manual merge. | |
108 | Default is "hgmerge". |
|
105 | Default is "hgmerge". | |
109 | quiet;; |
|
106 | quiet;; | |
110 | Reduce the amount of output printed. True or False. Default is False. |
|
107 | Reduce the amount of output printed. True or False. Default is False. | |
111 | username;; |
|
108 | username;; | |
112 | The committer of a changeset created when running "commit". |
|
109 | The committer of a changeset created when running "commit". | |
113 | Typically a person's name and email address, e.g. "Fred Widget |
|
110 | Typically a person's name and email address, e.g. "Fred Widget | |
114 | <fred@example.com>". Default is $EMAIL or username@hostname. |
|
111 | <fred@example.com>". Default is $EMAIL or username@hostname. | |
115 | verbose;; |
|
112 | verbose;; | |
116 | Increase the amount of output printed. True or False. Default is False. |
|
113 | Increase the amount of output printed. True or False. Default is False. | |
|
114 | ssh;; | |||
|
115 | command to use for SSH connections. Default is 'ssh'. | |||
|
116 | remotecmd;; | |||
|
117 | command to use for remote push operations. Default is 'hg'. | |||
|
118 | ||||
117 |
|
119 | |||
118 | web:: |
|
120 | web:: | |
119 | Web interface configuration. |
|
121 | Web interface configuration. | |
120 | name;; |
|
122 | name;; | |
121 | Repository name to use in the web interface. Default is current |
|
123 | Repository name to use in the web interface. Default is current | |
122 | working directory. |
|
124 | working directory. | |
123 | address;; |
|
125 | address;; | |
124 | Interface address to bind to. Default is all. |
|
126 | Interface address to bind to. Default is all. | |
125 | port;; |
|
127 | port;; | |
126 | Port to listen on. Default is 8000. |
|
128 | Port to listen on. Default is 8000. | |
127 | ipv6;; |
|
129 | ipv6;; | |
128 | Whether to use IPv6. Default is false. |
|
130 | Whether to use IPv6. Default is false. | |
129 | accesslog;; |
|
131 | accesslog;; | |
130 | Where to output the access log. Default is stdout. |
|
132 | Where to output the access log. Default is stdout. | |
131 | errorlog;; |
|
133 | errorlog;; | |
132 | Where to output the error log. Default is stderr. |
|
134 | Where to output the error log. Default is stderr. | |
133 | templates;; |
|
135 | templates;; | |
134 | Where to find the HTML templates. Default is install path. |
|
136 | Where to find the HTML templates. Default is install path. | |
135 |
|
137 | |||
136 | AUTHOR |
|
138 | AUTHOR | |
137 | ------ |
|
139 | ------ | |
138 | Bryan O'Sullivan <bos@serpentine.com>. |
|
140 | Bryan O'Sullivan <bos@serpentine.com>. | |
139 |
|
141 | |||
140 | Mercurial was written by Matt Mackall <mpm@selenic.com>. |
|
142 | Mercurial was written by Matt Mackall <mpm@selenic.com>. | |
141 |
|
143 | |||
142 | SEE ALSO |
|
144 | SEE ALSO | |
143 | -------- |
|
145 | -------- | |
144 | hg(1) |
|
146 | hg(1) | |
145 |
|
147 | |||
146 | COPYING |
|
148 | COPYING | |
147 | ------- |
|
149 | ------- | |
148 | This manual page is copyright 2005 Bryan O'Sullivan. |
|
150 | This manual page is copyright 2005 Bryan O'Sullivan. | |
149 | Mercurial is copyright 2005 Matt Mackall. |
|
151 | Mercurial is copyright 2005 Matt Mackall. | |
150 | Free use of this software is granted under the terms of the GNU General |
|
152 | Free use of this software is granted under the terms of the GNU General | |
151 | Public License (GPL). |
|
153 | Public License (GPL). |
General Comments 0
You need to be logged in to leave comments.
Login now