Show More
@@ -1,807 +1,807 | |||||
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 | -R, --repository:: |
|
20 | -R, --repository:: | |
21 | repository root directory |
|
21 | repository root directory | |
22 |
|
22 | |||
23 | --cwd:: |
|
23 | --cwd:: | |
24 | change working directory |
|
24 | change working directory | |
25 |
|
25 | |||
26 | -y, --noninteractive:: |
|
26 | -y, --noninteractive:: | |
27 | do not prompt, assume 'yes' for any required answers |
|
27 | do not prompt, assume 'yes' for any required answers | |
28 |
|
28 | |||
29 | -q, --quiet:: |
|
29 | -q, --quiet:: | |
30 | suppress output |
|
30 | suppress output | |
31 |
|
31 | |||
32 | -v, --verbose:: |
|
32 | -v, --verbose:: | |
33 | enable additional output |
|
33 | enable additional output | |
34 |
|
34 | |||
35 | --debug:: |
|
35 | --debug:: | |
36 | enable debugging output |
|
36 | enable debugging output | |
37 |
|
37 | |||
38 | --traceback:: |
|
38 | --traceback:: | |
39 | print traceback on exception |
|
39 | print traceback on exception | |
40 |
|
40 | |||
41 | --time:: |
|
41 | --time:: | |
42 | time how long the command takes |
|
42 | time how long the command takes | |
43 |
|
43 | |||
44 | --profile:: |
|
44 | --profile:: | |
45 | print command execution profile |
|
45 | print command execution profile | |
46 |
|
46 | |||
47 | --version:: |
|
47 | --version:: | |
48 | output version information and exit |
|
48 | output version information and exit | |
49 |
|
49 | |||
50 | -h, --help:: |
|
50 | -h, --help:: | |
51 | display help and exit |
|
51 | display help and exit | |
52 |
|
52 | |||
53 | COMMAND ELEMENTS |
|
53 | COMMAND ELEMENTS | |
54 | ---------------- |
|
54 | ---------------- | |
55 |
|
55 | |||
56 | files ...:: |
|
56 | files ...:: | |
57 | indicates one or more filename or relative path filenames; see |
|
57 | indicates one or more filename or relative path filenames; see | |
58 | "FILE NAME PATTERNS" for information on pattern matching |
|
58 | "FILE NAME PATTERNS" for information on pattern matching | |
59 |
|
59 | |||
60 | path:: |
|
60 | path:: | |
61 | indicates a path on the local machine |
|
61 | indicates a path on the local machine | |
62 |
|
62 | |||
63 | revision:: |
|
63 | revision:: | |
64 | indicates a changeset which can be specified as a changeset revision |
|
64 | indicates a changeset which can be specified as a changeset revision | |
65 | number, a tag, or a unique substring of the changeset hash value |
|
65 | number, a tag, or a unique substring of the changeset hash value | |
66 |
|
66 | |||
67 | repository path:: |
|
67 | repository path:: | |
68 | either the pathname of a local repository or the URI of a remote |
|
68 | either the pathname of a local repository or the URI of a remote | |
69 | repository. There are two available URI protocols, http:// which is |
|
69 | repository. There are two available URI protocols, http:// which is | |
70 | fast and the old-http:// protocol which is much slower but does not |
|
70 | fast and the old-http:// protocol which is much slower but does not | |
71 | require a special server on the web host. |
|
71 | require a special server on the web host. | |
72 |
|
72 | |||
73 | COMMANDS |
|
73 | COMMANDS | |
74 | -------- |
|
74 | -------- | |
75 |
|
75 | |||
76 | add [options] [files ...]:: |
|
76 | add [options] [files ...]:: | |
77 | Schedule files to be version controlled and added to the repository. |
|
77 | Schedule files to be version controlled and added to the repository. | |
78 |
|
78 | |||
79 | The files will be added to the repository at the next commit. |
|
79 | The files will be added to the repository at the next commit. | |
80 |
|
80 | |||
81 | If no names are given, add all files in the current directory and |
|
81 | If no names are given, add all files in the current directory and | |
82 | its subdirectories. |
|
82 | its subdirectories. | |
83 |
|
83 | |||
84 | addremove [options] [files ...]:: |
|
84 | addremove [options] [files ...]:: | |
85 | Add all new files and remove all missing files from the repository. |
|
85 | Add all new files and remove all missing files from the repository. | |
86 |
|
86 | |||
87 | New files are ignored if they match any of the patterns in .hgignore. As |
|
87 | New files are ignored if they match any of the patterns in .hgignore. As | |
88 | with add, these changes take effect at the next commit. |
|
88 | with add, these changes take effect at the next commit. | |
89 |
|
89 | |||
90 | annotate [-r <rev> -u -n -c] [files ...]:: |
|
90 | annotate [-r <rev> -u -n -c] [files ...]:: | |
91 | List changes in files, showing the revision id responsible for each line |
|
91 | List changes in files, showing the revision id responsible for each line | |
92 |
|
92 | |||
93 | This command is useful to discover who did a change or when a change took |
|
93 | This command is useful to discover who did a change or when a change took | |
94 | place. |
|
94 | place. | |
95 |
|
95 | |||
96 | Without the -a option, annotate will avoid processing files it |
|
96 | Without the -a option, annotate will avoid processing files it | |
97 | detects as binary. With -a, annotate will generate an annotation |
|
97 | detects as binary. With -a, annotate will generate an annotation | |
98 | anyway, probably with undesirable results. |
|
98 | anyway, probably with undesirable results. | |
99 |
|
99 | |||
100 | options: |
|
100 | options: | |
101 | -a, --text treat all files as text |
|
101 | -a, --text treat all files as text | |
102 | -I, --include <pat> include names matching the given patterns |
|
102 | -I, --include <pat> include names matching the given patterns | |
103 | -X, --exclude <pat> exclude names matching the given patterns |
|
103 | -X, --exclude <pat> exclude names matching the given patterns | |
104 | -r, --revision <rev> annotate the specified revision |
|
104 | -r, --revision <rev> annotate the specified revision | |
105 | -u, --user list the author |
|
105 | -u, --user list the author | |
106 | -c, --changeset list the changeset |
|
106 | -c, --changeset list the changeset | |
107 | -n, --number list the revision number (default) |
|
107 | -n, --number list the revision number (default) | |
108 |
|
108 | |||
109 | bundle <file> <other>:: |
|
109 | bundle <file> <other>:: | |
110 | (EXPERIMENTAL) |
|
110 | (EXPERIMENTAL) | |
111 |
|
111 | |||
112 | Generate a compressed changegroup file collecting all changesets |
|
112 | Generate a compressed changegroup file collecting all changesets | |
113 | not found in the other repository. |
|
113 | not found in the other repository. | |
114 |
|
114 | |||
115 | This file can then be transferred using conventional means and |
|
115 | This file can then be transferred using conventional means and | |
116 | applied to another repository with the unbundle command. This is |
|
116 | applied to another repository with the unbundle command. This is | |
117 | useful when native push and pull are not available or when |
|
117 | useful when native push and pull are not available or when | |
118 | exporting an entire repository is undesirable. The standard file |
|
118 | exporting an entire repository is undesirable. The standard file | |
119 | extension is ".hg". |
|
119 | extension is ".hg". | |
120 |
|
120 | |||
121 | Unlike import/export, this exactly preserves all changeset |
|
121 | Unlike import/export, this exactly preserves all changeset | |
122 | contents including permissions, rename data, and revision history. |
|
122 | contents including permissions, rename data, and revision history. | |
123 |
|
123 | |||
124 | cat [options] <file ...>:: |
|
124 | cat [options] <file ...>:: | |
125 | Print the specified files as they were at the given revision. |
|
125 | Print the specified files as they were at the given revision. | |
126 | If no revision is given then the tip is used. |
|
126 | If no revision is given then the tip is used. | |
127 |
|
127 | |||
128 | Output may be to a file, in which case the name of the file is |
|
128 | Output may be to a file, in which case the name of the file is | |
129 | given using a format string. The formatting rules are the same as |
|
129 | given using a format string. The formatting rules are the same as | |
130 | for the export command, with the following additions: |
|
130 | for the export command, with the following additions: | |
131 |
|
131 | |||
132 | %s basename of file being printed |
|
132 | %s basename of file being printed | |
133 | %d dirname of file being printed, or '.' if in repo root |
|
133 | %d dirname of file being printed, or '.' if in repo root | |
134 | %p root-relative path name of file being printed |
|
134 | %p root-relative path name of file being printed | |
135 |
|
135 | |||
136 | options: |
|
136 | options: | |
137 | -I, --include <pat> include names matching the given patterns |
|
137 | -I, --include <pat> include names matching the given patterns | |
138 | -X, --exclude <pat> exclude names matching the given patterns |
|
138 | -X, --exclude <pat> exclude names matching the given patterns | |
139 | -o, --output <filespec> print output to file with formatted name |
|
139 | -o, --output <filespec> print output to file with formatted name | |
140 | -r, --rev <rev> print the given revision |
|
140 | -r, --rev <rev> print the given revision | |
141 |
|
141 | |||
142 | clone [options] <source> [dest]:: |
|
142 | clone [options] <source> [dest]:: | |
143 | Create a copy of an existing repository in a new directory. |
|
143 | Create a copy of an existing repository in a new directory. | |
144 |
|
144 | |||
145 | If no destination directory name is specified, it defaults to the |
|
145 | If no destination directory name is specified, it defaults to the | |
146 | basename of the source. |
|
146 | basename of the source. | |
147 |
|
147 | |||
148 | The location of the source is added to the new repository's |
|
148 | The location of the source is added to the new repository's | |
149 | .hg/hgrc file, as the default to be used for future pulls. |
|
149 | .hg/hgrc file, as the default to be used for future pulls. | |
150 |
|
150 | |||
151 | For efficiency, hardlinks are used for cloning whenever the source |
|
151 | For efficiency, hardlinks are used for cloning whenever the source | |
152 | and destination are on the same filesystem. Some filesystems, |
|
152 | and destination are on the same filesystem. Some filesystems, | |
153 | such as AFS, implement hardlinking incorrectly, but do not report |
|
153 | such as AFS, implement hardlinking incorrectly, but do not report | |
154 | errors. In these cases, use the --pull option to avoid |
|
154 | errors. In these cases, use the --pull option to avoid | |
155 | hardlinking. |
|
155 | hardlinking. | |
156 |
|
156 | |||
157 | options: |
|
157 | options: | |
158 | -U, --noupdate do not update the new working directory |
|
158 | -U, --noupdate do not update the new working directory | |
159 | --pull use pull protocol to copy metadata |
|
159 | --pull use pull protocol to copy metadata | |
160 | -e, --ssh specify ssh command to use |
|
160 | -e, --ssh specify ssh command to use | |
161 | --remotecmd specify hg command to run on the remote side |
|
161 | --remotecmd specify hg command to run on the remote side | |
162 |
|
162 | |||
163 | commit [options] [files...]:: |
|
163 | commit [options] [files...]:: | |
164 | Commit changes to the given files into the repository. |
|
164 | Commit changes to the given files into the repository. | |
165 |
|
165 | |||
166 | If a list of files is omitted, all changes reported by "hg status" |
|
166 | If a list of files is omitted, all changes reported by "hg status" | |
167 | from the root of the repository will be commited. |
|
167 | from the root of the repository will be commited. | |
168 |
|
168 | |||
169 | The HGEDITOR or EDITOR environment variables are used to start an |
|
169 | The HGEDITOR or EDITOR environment variables are used to start an | |
170 | editor to add a commit comment. |
|
170 | editor to add a commit comment. | |
171 |
|
171 | |||
172 | Options: |
|
172 | Options: | |
173 |
|
173 | |||
174 | -A, --addremove run addremove during commit |
|
174 | -A, --addremove run addremove during commit | |
175 | -I, --include <pat> include names matching the given patterns |
|
175 | -I, --include <pat> include names matching the given patterns | |
176 | -X, --exclude <pat> exclude names matching the given patterns |
|
176 | -X, --exclude <pat> exclude names matching the given patterns | |
177 | -m, --message <text> use <text> as commit message |
|
177 | -m, --message <text> use <text> as commit message | |
178 | -l, --logfile <file> read the commit message from <file> |
|
178 | -l, --logfile <file> read the commit message from <file> | |
179 | -d, --date <datecode> record datecode as commit date |
|
179 | -d, --date <datecode> record datecode as commit date | |
180 | -u, --user <user> record user as commiter |
|
180 | -u, --user <user> record user as commiter | |
181 |
|
181 | |||
182 | aliases: ci |
|
182 | aliases: ci | |
183 |
|
183 | |||
184 | copy <source ...> <dest>:: |
|
184 | copy <source ...> <dest>:: | |
185 | Mark dest as having copies of source files. If dest is a |
|
185 | Mark dest as having copies of source files. If dest is a | |
186 | directory, copies are put in that directory. If dest is a file, |
|
186 | directory, copies are put in that directory. If dest is a file, | |
187 | there can only be one source. |
|
187 | there can only be one source. | |
188 |
|
188 | |||
189 | By default, this command copies the contents of files as they |
|
189 | By default, this command copies the contents of files as they | |
190 | stand in the working directory. If invoked with --after, the |
|
190 | stand in the working directory. If invoked with --after, the | |
191 | operation is recorded, but no copying is performed. |
|
191 | operation is recorded, but no copying is performed. | |
192 |
|
192 | |||
193 | This command takes effect in the next commit. |
|
193 | This command takes effect in the next commit. | |
194 |
|
194 | |||
195 | NOTE: This command should be treated as experimental. While it |
|
195 | NOTE: This command should be treated as experimental. While it | |
196 | should properly record copied files, this information is not yet |
|
196 | should properly record copied files, this information is not yet | |
197 | fully used by merge, nor fully reported by log. |
|
197 | fully used by merge, nor fully reported by log. | |
198 |
|
198 | |||
199 | Options: |
|
199 | Options: | |
200 | -A, --after record a copy that has already occurred |
|
200 | -A, --after record a copy that has already occurred | |
201 | -I, --include <pat> include names matching the given patterns |
|
201 | -I, --include <pat> include names matching the given patterns | |
202 | -X, --exclude <pat> exclude names matching the given patterns |
|
202 | -X, --exclude <pat> exclude names matching the given patterns | |
203 | -f, --force forcibly copy over an existing managed file |
|
203 | -f, --force forcibly copy over an existing managed file | |
204 | -p, --parents append source path to dest |
|
204 | -p, --parents append source path to dest | |
205 |
|
205 | |||
206 | aliases: cp |
|
206 | aliases: cp | |
207 |
|
207 | |||
208 | diff [-a] [-r revision] [-r revision] [files ...]:: |
|
208 | diff [-a] [-r revision] [-r revision] [files ...]:: | |
209 | Show differences between revisions for the specified files. |
|
209 | Show differences between revisions for the specified files. | |
210 |
|
210 | |||
211 | Differences between files are shown using the unified diff format. |
|
211 | Differences between files are shown using the unified diff format. | |
212 |
|
212 | |||
213 | When two revision arguments are given, then changes are shown |
|
213 | When two revision arguments are given, then changes are shown | |
214 | between those revisions. If only one revision is specified then |
|
214 | between those revisions. If only one revision is specified then | |
215 | that revision is compared to the working directory, and, when no |
|
215 | that revision is compared to the working directory, and, when no | |
216 | revisions are specified, the working directory files are compared |
|
216 | revisions are specified, the working directory files are compared | |
217 | to its parent. |
|
217 | to its parent. | |
218 |
|
218 | |||
219 | Without the -a option, diff will avoid generating diffs of files |
|
219 | Without the -a option, diff will avoid generating diffs of files | |
220 | it detects as binary. With -a, diff will generate a diff anyway, |
|
220 | it detects as binary. With -a, diff will generate a diff anyway, | |
221 | probably with undesirable results. |
|
221 | probably with undesirable results. | |
222 |
|
222 | |||
223 | options: |
|
223 | options: | |
224 | -a, --text treat all files as text |
|
224 | -a, --text treat all files as text | |
225 | -I, --include <pat> include names matching the given patterns |
|
225 | -I, --include <pat> include names matching the given patterns | |
226 | -X, --exclude <pat> exclude names matching the given patterns |
|
226 | -X, --exclude <pat> exclude names matching the given patterns | |
227 |
|
227 | |||
228 | export [-o filespec] [revision] ...:: |
|
228 | export [-o filespec] [revision] ...:: | |
229 | Print the changeset header and diffs for one or more revisions. |
|
229 | Print the changeset header and diffs for one or more revisions. | |
230 |
|
230 | |||
231 | The information shown in the changeset header is: author, |
|
231 | The information shown in the changeset header is: author, | |
232 | changeset hash, parent and commit comment. |
|
232 | changeset hash, parent and commit comment. | |
233 |
|
233 | |||
234 | Output may be to a file, in which case the name of the file is |
|
234 | Output may be to a file, in which case the name of the file is | |
235 | given using a format string. The formatting rules are as follows: |
|
235 | given using a format string. The formatting rules are as follows: | |
236 |
|
236 | |||
237 | %% literal "%" character |
|
237 | %% literal "%" character | |
238 | %H changeset hash (40 bytes of hexadecimal) |
|
238 | %H changeset hash (40 bytes of hexadecimal) | |
239 | %N number of patches being generated |
|
239 | %N number of patches being generated | |
240 | %R changeset revision number |
|
240 | %R changeset revision number | |
241 | %b basename of the exporting repository |
|
241 | %b basename of the exporting repository | |
242 | %h short-form changeset hash (12 bytes of hexadecimal) |
|
242 | %h short-form changeset hash (12 bytes of hexadecimal) | |
243 | %n zero-padded sequence number, starting at 1 |
|
243 | %n zero-padded sequence number, starting at 1 | |
244 | %r zero-padded changeset revision number |
|
244 | %r zero-padded changeset revision number | |
245 |
|
245 | |||
246 | Without the -a option, export will avoid generating diffs of files |
|
246 | Without the -a option, export will avoid generating diffs of files | |
247 | it detects as binary. With -a, export will generate a diff anyway, |
|
247 | it detects as binary. With -a, export will generate a diff anyway, | |
248 | probably with undesirable results. |
|
248 | probably with undesirable results. | |
249 |
|
249 | |||
250 | options: |
|
250 | options: | |
251 | -a, --text treat all files as text |
|
251 | -a, --text treat all files as text | |
252 | -o, --output <filespec> print output to file with formatted name |
|
252 | -o, --output <filespec> print output to file with formatted name | |
253 |
|
253 | |||
254 | forget [options] [files]:: |
|
254 | forget [options] [files]:: | |
255 | Undo an 'hg add' scheduled for the next commit. |
|
255 | Undo an 'hg add' scheduled for the next commit. | |
256 |
|
256 | |||
257 | options: |
|
257 | options: | |
258 | -I, --include <pat> include names matching the given patterns |
|
258 | -I, --include <pat> include names matching the given patterns | |
259 | -X, --exclude <pat> exclude names matching the given patterns |
|
259 | -X, --exclude <pat> exclude names matching the given patterns | |
260 |
|
260 | |||
261 | grep [options] pattern [files]:: |
|
261 | grep [options] pattern [files]:: | |
262 | Search revisions of files for a regular expression. |
|
262 | Search revisions of files for a regular expression. | |
263 |
|
263 | |||
264 | This command behaves differently than Unix grep. It only accepts |
|
264 | This command behaves differently than Unix grep. It only accepts | |
265 | Python/Perl regexps. It searches repository history, not the |
|
265 | Python/Perl regexps. It searches repository history, not the | |
266 | working directory. It always prints the revision number in which |
|
266 | working directory. It always prints the revision number in which | |
267 | a match appears. |
|
267 | a match appears. | |
268 |
|
268 | |||
269 | By default, grep only prints output for the first revision of a |
|
269 | By default, grep only prints output for the first revision of a | |
270 | file in which it finds a match. To get it to print every revision |
|
270 | file in which it finds a match. To get it to print every revision | |
271 | that contains a change in match status ("-" for a match that |
|
271 | that contains a change in match status ("-" for a match that | |
272 | becomes a non-match, or "+" for a non-match that becomes a match), |
|
272 | becomes a non-match, or "+" for a non-match that becomes a match), | |
273 | use the --all flag. |
|
273 | use the --all flag. | |
274 |
|
274 | |||
275 | options: |
|
275 | options: | |
276 | -0, --print0 end fields with NUL |
|
276 | -0, --print0 end fields with NUL | |
277 | -I, --include <pat> include names matching the given patterns |
|
277 | -I, --include <pat> include names matching the given patterns | |
278 | -X, --exclude <pat> exclude names matching the given patterns |
|
278 | -X, --exclude <pat> exclude names matching the given patterns | |
279 | --all print all revisions that match |
|
279 | --all print all revisions that match | |
280 | -i, --ignore-case ignore case when matching |
|
280 | -i, --ignore-case ignore case when matching | |
281 | -l, --files-with-matches print only filenames and revs that match |
|
281 | -l, --files-with-matches print only filenames and revs that match | |
282 | -n, --line-number print matching line numbers |
|
282 | -n, --line-number print matching line numbers | |
283 | -r <rev>, --rev <rev> search in given revision range |
|
283 | -r <rev>, --rev <rev> search in given revision range | |
284 | -u, --user print user who committed change |
|
284 | -u, --user print user who committed change | |
285 |
|
285 | |||
286 | heads:: |
|
286 | heads:: | |
287 | Show all repository head changesets. |
|
287 | Show all repository head changesets. | |
288 |
|
288 | |||
289 | Repository "heads" are changesets that don't have children |
|
289 | Repository "heads" are changesets that don't have children | |
290 | changesets. They are where development generally takes place and |
|
290 | changesets. They are where development generally takes place and | |
291 | are the usual targets for update and merge operations. |
|
291 | are the usual targets for update and merge operations. | |
292 |
|
292 | |||
293 | identify:: |
|
293 | identify:: | |
294 | Print a short summary of the current state of the repo. |
|
294 | Print a short summary of the current state of the repo. | |
295 |
|
295 | |||
296 | This summary identifies the repository state using one or two parent |
|
296 | This summary identifies the repository state using one or two parent | |
297 | hash identifiers, followed by a "+" if there are uncommitted changes |
|
297 | hash identifiers, followed by a "+" if there are uncommitted changes | |
298 | in the working directory, followed by a list of tags for this revision. |
|
298 | in the working directory, followed by a list of tags for this revision. | |
299 |
|
299 | |||
300 | aliases: id |
|
300 | aliases: id | |
301 |
|
301 | |||
302 | import [-p <n> -b <base> -f] <patches>:: |
|
302 | import [-p <n> -b <base> -f] <patches>:: | |
303 | Import a list of patches and commit them individually. |
|
303 | Import a list of patches and commit them individually. | |
304 |
|
304 | |||
305 | If there are outstanding changes in the working directory, import |
|
305 | If there are outstanding changes in the working directory, import | |
306 | will abort unless given the -f flag. |
|
306 | will abort unless given the -f flag. | |
307 |
|
307 | |||
308 | If a patch looks like a mail message (its first line starts with |
|
308 | If a patch looks like a mail message (its first line starts with | |
309 | "From " or looks like an RFC822 header), it will not be applied |
|
309 | "From " or looks like an RFC822 header), it will not be applied | |
310 | unless the -f option is used. The importer neither parses nor |
|
310 | unless the -f option is used. The importer neither parses nor | |
311 | discards mail headers, so use -f only to override the "mailness" |
|
311 | discards mail headers, so use -f only to override the "mailness" | |
312 | safety check, not to import a real mail message. |
|
312 | safety check, not to import a real mail message. | |
313 |
|
313 | |||
314 | options: |
|
314 | options: | |
315 | -p, --strip <n> directory strip option for patch. This has the same |
|
315 | -p, --strip <n> directory strip option for patch. This has the same | |
316 | meaning as the corresponding patch option |
|
316 | meaning as the corresponding patch option | |
317 | -b <path> base directory to read patches from |
|
317 | -b <path> base directory to read patches from | |
318 | -f, --force skip check for outstanding uncommitted changes |
|
318 | -f, --force skip check for outstanding uncommitted changes | |
319 |
|
319 | |||
320 | aliases: patch |
|
320 | aliases: patch | |
321 |
|
321 | |||
322 | incoming [-p] [source]:: |
|
322 | incoming [-p] [source]:: | |
323 | Show new changesets found in the specified repo or the default |
|
323 | Show new changesets found in the specified repo or the default | |
324 | pull repo. These are the changesets that would be pulled if a pull |
|
324 | pull repo. These are the changesets that would be pulled if a pull | |
325 | was requested. |
|
325 | was requested. | |
326 |
|
326 | |||
327 | Currently only local repositories are supported. |
|
327 | Currently only local repositories are supported. | |
328 |
|
328 | |||
329 | options: |
|
329 | options: | |
330 | -p, --patch show patch |
|
330 | -p, --patch show patch | |
331 |
|
331 | |||
332 | aliases: in |
|
332 | aliases: in | |
333 |
|
333 | |||
334 | init [dest]:: |
|
334 | init [dest]:: | |
335 | Initialize a new repository in the given directory. If the given |
|
335 | Initialize a new repository in the given directory. If the given | |
336 | directory does not exist, it is created. |
|
336 | directory does not exist, it is created. | |
337 |
|
337 | |||
338 | If no directory is given, the current directory is used. |
|
338 | If no directory is given, the current directory is used. | |
339 |
|
339 | |||
340 | locate [options] [files]:: |
|
340 | locate [options] [files]:: | |
341 | Print all files under Mercurial control whose names match the |
|
341 | Print all files under Mercurial control whose names match the | |
342 | given patterns. |
|
342 | given patterns. | |
343 |
|
343 | |||
344 | This command searches the current directory and its |
|
344 | This command searches the current directory and its | |
345 | subdirectories. To search an entire repository, move to the root |
|
345 | subdirectories. To search an entire repository, move to the root | |
346 | of the repository. |
|
346 | of the repository. | |
347 |
|
347 | |||
348 | If no patterns are given to match, this command prints all file |
|
348 | If no patterns are given to match, this command prints all file | |
349 | names. |
|
349 | names. | |
350 |
|
350 | |||
351 | If you want to feed the output of this command into the "xargs" |
|
351 | If you want to feed the output of this command into the "xargs" | |
352 | command, use the "-0" option to both this command and "xargs". |
|
352 | command, use the "-0" option to both this command and "xargs". | |
353 | This will avoid the problem of "xargs" treating single filenames |
|
353 | This will avoid the problem of "xargs" treating single filenames | |
354 | that contain white space as multiple filenames. |
|
354 | that contain white space as multiple filenames. | |
355 |
|
355 | |||
356 | options: |
|
356 | options: | |
357 |
|
357 | |||
358 | -0, --print0 end filenames with NUL, for use with xargs |
|
358 | -0, --print0 end filenames with NUL, for use with xargs | |
359 | -f, --fullpath print complete paths from the filesystem root |
|
359 | -f, --fullpath print complete paths from the filesystem root | |
360 | -I, --include <pat> include names matching the given patterns |
|
360 | -I, --include <pat> include names matching the given patterns | |
361 | -r, --rev <rev> search the repository as it stood at rev |
|
361 | -r, --rev <rev> search the repository as it stood at rev | |
362 | -X, --exclude <pat> exclude names matching the given patterns |
|
362 | -X, --exclude <pat> exclude names matching the given patterns | |
363 |
|
363 | |||
364 | log [-r revision ...] [-p] [files]:: |
|
364 | log [-r revision ...] [-p] [files]:: | |
365 | Print the revision history of the specified files or the entire project. |
|
365 | Print the revision history of the specified files or the entire project. | |
366 |
|
366 | |||
367 | By default this command outputs: changeset id and hash, tags, |
|
367 | By default this command outputs: changeset id and hash, tags, | |
368 | parents, user, date and time, and a summary for each commit. The |
|
368 | parents, user, date and time, and a summary for each commit. The | |
369 | -v switch adds some more detail, such as changed files, manifest |
|
369 | -v switch adds some more detail, such as changed files, manifest | |
370 | hashes or message signatures. |
|
370 | hashes or message signatures. | |
371 |
|
371 | |||
372 | options: |
|
372 | options: | |
373 | -I, --include <pat> include names matching the given patterns |
|
373 | -I, --include <pat> include names matching the given patterns | |
374 | -X, --exclude <pat> exclude names matching the given patterns |
|
374 | -X, --exclude <pat> exclude names matching the given patterns | |
375 | -r, --rev <A> show the specified revision or range |
|
375 | -r, --rev <A> show the specified revision or range | |
376 | -p, --patch show patch |
|
376 | -p, --patch show patch | |
377 |
|
377 | |||
378 | aliases: history |
|
378 | aliases: history | |
379 |
|
379 | |||
380 | manifest [revision]:: |
|
380 | manifest [revision]:: | |
381 | Print a list of version controlled files for the given revision. |
|
381 | Print a list of version controlled files for the given revision. | |
382 |
|
382 | |||
383 | The manifest is the list of files being version controlled. If no revision |
|
383 | The manifest is the list of files being version controlled. If no revision | |
384 | is given then the tip is used. |
|
384 | is given then the tip is used. | |
385 |
|
385 | |||
386 | outgoing [-p] [dest]:: |
|
386 | outgoing [-p] [dest]:: | |
387 | Show changesets not found in the specified destination repo or the |
|
387 | Show changesets not found in the specified destination repo or the | |
388 | default push repo. These are the changesets that would be pushed |
|
388 | default push repo. These are the changesets that would be pushed | |
389 | if a push was requested. |
|
389 | if a push was requested. | |
390 |
|
390 | |||
391 | options: |
|
391 | options: | |
392 | -p, --patch show patch |
|
392 | -p, --patch show patch | |
393 |
|
393 | |||
394 | aliases: out |
|
394 | aliases: out | |
395 |
|
395 | |||
396 | parents:: |
|
396 | parents:: | |
397 | Print the working directory's parent revisions. |
|
397 | Print the working directory's parent revisions. | |
398 |
|
398 | |||
399 | paths [NAME]:: |
|
399 | paths [NAME]:: | |
400 | Show definition of symbolic path name NAME. If no name is given, show |
|
400 | Show definition of symbolic path name NAME. If no name is given, show | |
401 | definition of available names. |
|
401 | definition of available names. | |
402 |
|
402 | |||
403 | Path names are defined in the [paths] section of /etc/mercurial/hgrc |
|
403 | Path names are defined in the [paths] section of /etc/mercurial/hgrc | |
404 | and $HOME/.hgrc. If run inside a repository, .hg/hgrc is used, too. |
|
404 | and $HOME/.hgrc. If run inside a repository, .hg/hgrc is used, too. | |
405 |
|
405 | |||
406 | pull <repository path>:: |
|
406 | pull <repository path>:: | |
407 | Pull changes from a remote repository to a local one. |
|
407 | Pull changes from a remote repository to a local one. | |
408 |
|
408 | |||
409 | This finds all changes from the repository at the specified path |
|
409 | This finds all changes from the repository at the specified path | |
410 | or URL and adds them to the local repository. By default, this |
|
410 | or URL and adds them to the local repository. By default, this | |
411 | does not update the copy of the project in the working directory. |
|
411 | does not update the copy of the project in the working directory. | |
412 |
|
412 | |||
413 | Valid URLs are of the form: |
|
413 | Valid URLs are of the form: | |
414 |
|
414 | |||
415 | local/filesystem/path |
|
415 | local/filesystem/path | |
416 | http://[user@]host[:port][/path] |
|
416 | http://[user@]host[:port][/path] | |
417 | https://[user@]host[:port][/path] |
|
417 | https://[user@]host[:port][/path] | |
418 | ssh://[user@]host[:port][/path] |
|
418 | ssh://[user@]host[:port][/path] | |
419 |
|
419 | |||
420 | SSH requires an accessible shell account on the destination machine |
|
420 | SSH requires an accessible shell account on the destination machine | |
421 | and a copy of hg in the remote path. With SSH, paths are relative |
|
421 | and a copy of hg in the remote path. With SSH, paths are relative | |
422 | to the remote user's home directory by default; use two slashes at |
|
422 | to the remote user's home directory by default; use two slashes at | |
423 | the start of a path to specify it as relative to the filesystem root. |
|
423 | the start of a path to specify it as relative to the filesystem root. | |
424 |
|
424 | |||
425 | options: |
|
425 | options: | |
426 | -u, --update update the working directory to tip after pull |
|
426 | -u, --update update the working directory to tip after pull | |
427 | -e, --ssh specify ssh command to use |
|
427 | -e, --ssh specify ssh command to use | |
428 | --remotecmd specify hg command to run on the remote side |
|
428 | --remotecmd specify hg command to run on the remote side | |
429 |
|
429 | |||
430 | push <destination>:: |
|
430 | push <destination>:: | |
431 | Push changes from the local repository to the given destination. |
|
431 | Push changes from the local repository to the given destination. | |
432 |
|
432 | |||
433 | This is the symmetrical operation for pull. It helps to move |
|
433 | This is the symmetrical operation for pull. It helps to move | |
434 | changes from the current repository to a different one. If the |
|
434 | changes from the current repository to a different one. If the | |
435 | destination is local this is identical to a pull in that directory |
|
435 | destination is local this is identical to a pull in that directory | |
436 | from the current one. |
|
436 | from the current one. | |
437 |
|
437 | |||
438 | By default, push will refuse to run if it detects the result would |
|
438 | By default, push will refuse to run if it detects the result would | |
439 | increase the number of remote heads. This generally indicates the |
|
439 | increase the number of remote heads. This generally indicates the | |
440 | the client has forgotten to sync and merge before pushing. |
|
440 | the client has forgotten to sync and merge before pushing. | |
441 |
|
441 | |||
442 | Valid URLs are of the form: |
|
442 | Valid URLs are of the form: | |
443 |
|
443 | |||
444 | local/filesystem/path |
|
444 | local/filesystem/path | |
445 | ssh://[user@]host[:port][/path] |
|
445 | ssh://[user@]host[:port][/path] | |
446 |
|
446 | |||
447 | SSH requires an accessible shell account on the destination |
|
447 | SSH requires an accessible shell account on the destination | |
448 | machine and a copy of hg in the remote path. |
|
448 | machine and a copy of hg in the remote path. | |
449 |
|
449 | |||
450 | options: |
|
450 | options: | |
451 |
|
451 | |||
452 | -f, --force force update |
|
452 | -f, --force force update | |
453 | -e, --ssh specify ssh command to use |
|
453 | -e, --ssh specify ssh command to use | |
454 | --remotecmd specify hg command to run on the remote side |
|
454 | --remotecmd specify hg command to run on the remote side | |
455 |
|
455 | |||
456 | rawcommit [-p -d -u -F -m -l]:: |
|
456 | rawcommit [-p -d -u -F -m -l]:: | |
457 | Lowlevel commit, for use in helper scripts. |
|
457 | Lowlevel commit, for use in helper scripts. | |
458 |
|
458 | |||
459 | This command is not intended to be used by normal users, as it is |
|
459 | This command is not intended to be used by normal users, as it is | |
460 | primarily useful for importing from other SCMs. |
|
460 | primarily useful for importing from other SCMs. | |
461 |
|
461 | |||
462 | recover:: |
|
462 | recover:: | |
463 | Recover from an interrupted commit or pull. |
|
463 | Recover from an interrupted commit or pull. | |
464 |
|
464 | |||
465 | This command tries to fix the repository status after an interrupted |
|
465 | This command tries to fix the repository status after an interrupted | |
466 | operation. It should only be necessary when Mercurial suggests it. |
|
466 | operation. It should only be necessary when Mercurial suggests it. | |
467 |
|
467 | |||
468 | remove [options] [files ...]:: |
|
468 | remove [options] [files ...]:: | |
469 | Schedule the indicated files for removal from the repository. |
|
469 | Schedule the indicated files for removal from the repository. | |
470 |
|
470 | |||
471 | This command schedules the files to be removed at the next commit. |
|
471 | This command schedules the files to be removed at the next commit. | |
472 | This only removes files from the current branch, not from the |
|
472 | This only removes files from the current branch, not from the | |
473 | entire project history. If the files still exist in the working |
|
473 | entire project history. If the files still exist in the working | |
474 | directory, they will be deleted from it. |
|
474 | directory, they will be deleted from it. | |
475 |
|
475 | |||
476 | aliases: rm |
|
476 | aliases: rm | |
477 |
|
477 | |||
478 | rename <source ...> <dest>:: |
|
478 | rename <source ...> <dest>:: | |
479 | Mark dest as copies of sources; mark sources for deletion. If |
|
479 | Mark dest as copies of sources; mark sources for deletion. If | |
480 | dest is a directory, copies are put in that directory. If dest is |
|
480 | dest is a directory, copies are put in that directory. If dest is | |
481 | a file, there can only be one source. |
|
481 | a file, there can only be one source. | |
482 |
|
482 | |||
483 | By default, this command copies the contents of files as they |
|
483 | By default, this command copies the contents of files as they | |
484 | stand in the working directory. If invoked with --after, the |
|
484 | stand in the working directory. If invoked with --after, the | |
485 | operation is recorded, but no copying is performed. |
|
485 | operation is recorded, but no copying is performed. | |
486 |
|
486 | |||
487 | This command takes effect in the next commit. |
|
487 | This command takes effect in the next commit. | |
488 |
|
488 | |||
489 | NOTE: This command should be treated as experimental. While it |
|
489 | NOTE: This command should be treated as experimental. While it | |
490 | should properly record rename files, this information is not yet |
|
490 | should properly record rename files, this information is not yet | |
491 | fully used by merge, nor fully reported by log. |
|
491 | fully used by merge, nor fully reported by log. | |
492 |
|
492 | |||
493 | Options: |
|
493 | Options: | |
494 | -A, --after record a rename that has already occurred |
|
494 | -A, --after record a rename that has already occurred | |
495 | -f, --force forcibly copy over an existing managed file |
|
495 | -f, --force forcibly copy over an existing managed file | |
496 | -p, --parents append source path to dest |
|
496 | -p, --parents append source path to dest | |
497 |
|
497 | |||
498 | aliases: mv |
|
498 | aliases: mv | |
499 |
|
499 | |||
500 | revert [names ...]:: |
|
500 | revert [names ...]:: | |
501 | Revert any uncommitted modifications made to the named files or |
|
501 | Revert any uncommitted modifications made to the named files or | |
502 | directories. This restores the contents of the affected files to |
|
502 | directories. This restores the contents of the affected files to | |
503 | an unmodified state. |
|
503 | an unmodified state. | |
504 |
|
504 | |||
505 | If a file has been deleted, it is recreated. If the executable |
|
505 | If a file has been deleted, it is recreated. If the executable | |
506 | mode of a file was changed, it is reset. |
|
506 | mode of a file was changed, it is reset. | |
507 |
|
507 | |||
508 | If a directory is given, all files in that directory and its |
|
508 | If a directory is given, all files in that directory and its | |
509 | subdirectories are reverted. |
|
509 | subdirectories are reverted. | |
510 |
|
510 | |||
511 | If no arguments are given, all files in the current directory and |
|
511 | If no arguments are given, all files in the current directory and | |
512 | its subdirectories are reverted. |
|
512 | its subdirectories are reverted. | |
513 |
|
513 | |||
514 | options: |
|
514 | options: | |
515 | -r, --rev <rev> revision to revert to |
|
515 | -r, --rev <rev> revision to revert to | |
516 | -n, --nonrecursive do not recurse into subdirectories |
|
516 | -n, --nonrecursive do not recurse into subdirectories | |
517 |
|
517 | |||
518 | root:: |
|
518 | root:: | |
519 | Print the root directory of the current repository. |
|
519 | Print the root directory of the current repository. | |
520 |
|
520 | |||
521 | serve [options]:: |
|
521 | serve [options]:: | |
522 | Start a local HTTP repository browser and pull server. |
|
522 | Start a local HTTP repository browser and pull server. | |
523 |
|
523 | |||
524 | By default, the server logs accesses to stdout and errors to |
|
524 | By default, the server logs accesses to stdout and errors to | |
525 | stderr. Use the "-A" and "-E" options to log to files. |
|
525 | stderr. Use the "-A" and "-E" options to log to files. | |
526 |
|
526 | |||
527 | options: |
|
527 | options: | |
528 | -A, --accesslog <file> name of access log file to write to |
|
528 | -A, --accesslog <file> name of access log file to write to | |
529 | -E, --errorlog <file> name of error log file to write to |
|
529 | -E, --errorlog <file> name of error log file to write to | |
530 | -a, --address <addr> address to use |
|
530 | -a, --address <addr> address to use | |
531 | -p, --port <n> port to use (default: 8000) |
|
531 | -p, --port <n> port to use (default: 8000) | |
532 | -n, --name <name> name to show in web pages (default: working dir) |
|
532 | -n, --name <name> name to show in web pages (default: working dir) | |
533 | -t, --templatedir <path> web templates to use |
|
533 | -t, --templatedir <path> web templates to use | |
534 | -6, --ipv6 use IPv6 in addition to IPv4 |
|
534 | -6, --ipv6 use IPv6 in addition to IPv4 | |
535 |
|
535 | |||
536 | status [options] [files]:: |
|
536 | status [options] [files]:: | |
537 | Show changed files in the working directory. If no names are |
|
537 | Show changed files in the working directory. If no names are | |
538 | given, all files are shown. Otherwise, only files matching the |
|
538 | given, all files are shown. Otherwise, only files matching the | |
539 | given names are shown. |
|
539 | given names are shown. | |
540 |
|
540 | |||
541 | The codes used to show the status of files are: |
|
541 | The codes used to show the status of files are: | |
542 |
|
542 | |||
543 | M = changed |
|
543 | M = changed | |
544 | A = added |
|
544 | A = added | |
545 | R = removed |
|
545 | R = removed | |
546 | ? = not tracked |
|
546 | ? = not tracked | |
547 |
|
547 | |||
548 | options: |
|
548 | options: | |
549 |
|
549 | |||
550 | -m, --modified show only modified files |
|
550 | -m, --modified show only modified files | |
551 | -a, --added show only added files |
|
551 | -a, --added show only added files | |
552 | -r, --removed show only removed files |
|
552 | -r, --removed show only removed files | |
553 | -u, --unknown show only unknown (not tracked) files |
|
553 | -u, --unknown show only unknown (not tracked) files | |
554 | -n, --no-status hide status prefix |
|
554 | -n, --no-status hide status prefix | |
555 | -0, --print0 end filenames with NUL, for use with xargs |
|
555 | -0, --print0 end filenames with NUL, for use with xargs | |
556 | -I, --include <pat> include names matching the given patterns |
|
556 | -I, --include <pat> include names matching the given patterns | |
557 | -X, --exclude <pat> exclude names matching the given patterns |
|
557 | -X, --exclude <pat> exclude names matching the given patterns | |
558 |
|
558 | |||
559 | tag [-l -m <text> -d <datecode> -u <user>] <name> [revision]:: |
|
559 | tag [-l -m <text> -d <datecode> -u <user>] <name> [revision]:: | |
560 | Name a particular revision using <name>. |
|
560 | Name a particular revision using <name>. | |
561 |
|
561 | |||
562 | Tags are used to name particular revisions of the repository and are |
|
562 | Tags are used to name particular revisions of the repository and are | |
563 | very useful to compare different revision, to go back to significant |
|
563 | very useful to compare different revision, to go back to significant | |
564 | earlier versions or to mark branch points as releases, etc. |
|
564 | earlier versions or to mark branch points as releases, etc. | |
565 |
|
565 | |||
566 | If no revision is given, the tip is used. |
|
566 | If no revision is given, the tip is used. | |
567 |
|
567 | |||
568 | To facilitate version control, distribution, and merging of tags, |
|
568 | To facilitate version control, distribution, and merging of tags, | |
569 | they are stored as a file named ".hgtags" which is managed |
|
569 | they are stored as a file named ".hgtags" which is managed | |
570 | similarly to other project files and can be hand-edited if |
|
570 | similarly to other project files and can be hand-edited if | |
571 | necessary. |
|
571 | necessary. | |
572 |
|
572 | |||
573 | options: |
|
573 | options: | |
574 | -l, --local make the tag local |
|
574 | -l, --local make the tag local | |
575 | -m, --message <text> message for tag commit log entry |
|
575 | -m, --message <text> message for tag commit log entry | |
576 | -d, --date <datecode> datecode for commit |
|
576 | -d, --date <datecode> datecode for commit | |
577 | -u, --user <user> user for commit |
|
577 | -u, --user <user> user for commit | |
578 |
|
578 | |||
579 | Note: Local tags are not version-controlled or distributed and are |
|
579 | Note: Local tags are not version-controlled or distributed and are | |
580 | stored in the .hg/localtags file. If there exists a local tag and |
|
580 | stored in the .hg/localtags file. If there exists a local tag and | |
581 | a public tag with the same name, local tag is used. |
|
581 | a public tag with the same name, local tag is used. | |
582 |
|
582 | |||
583 | tags:: |
|
583 | tags:: | |
584 | List the repository tags. |
|
584 | List the repository tags. | |
585 |
|
585 | |||
586 | This lists both regular and local tags. |
|
586 | This lists both regular and local tags. | |
587 |
|
587 | |||
588 | tip:: |
|
588 | tip:: | |
589 | Show the tip revision. |
|
589 | Show the tip revision. | |
590 |
|
590 | |||
591 | unbundle <file>:: |
|
591 | unbundle <file>:: | |
592 | (EXPERIMENTAL) |
|
592 | (EXPERIMENTAL) | |
593 |
|
593 | |||
594 | Apply a compressed changegroup file generated by the bundle |
|
594 | Apply a compressed changegroup file generated by the bundle | |
595 | command. |
|
595 | command. | |
596 |
|
596 | |||
597 | undo:: |
|
597 | undo:: | |
598 | Undo the last commit or pull transaction. |
|
598 | Undo the last commit or pull transaction. | |
599 |
|
599 | |||
600 | Roll back the last pull or commit transaction on the |
|
600 | Roll back the last pull or commit transaction on the | |
601 | repository, restoring the project to its earlier state. |
|
601 | repository, restoring the project to its earlier state. | |
602 |
|
602 | |||
603 | This command should be used with care. There is only one level of |
|
603 | This command should be used with care. There is only one level of | |
604 | undo and there is no redo. |
|
604 | undo and there is no redo. | |
605 |
|
605 | |||
606 | This command is not intended for use on public repositories. Once |
|
606 | This command is not intended for use on public repositories. Once | |
607 | a change is visible for pull by other users, undoing it locally is |
|
607 | a change is visible for pull by other users, undoing it locally is | |
608 | ineffective. |
|
608 | ineffective. | |
609 |
|
609 | |||
610 | update [-m -C] [revision]:: |
|
610 | update [-m -C] [revision]:: | |
611 | Update the working directory to the specified revision. |
|
611 | Update the working directory to the specified revision. | |
612 |
|
612 | |||
613 | By default, update will refuse to run if doing so would require |
|
613 | By default, update will refuse to run if doing so would require | |
614 | merging or discarding local changes. |
|
614 | merging or discarding local changes. | |
615 |
|
615 | |||
616 | With the -m option, a merge will be performed. |
|
616 | With the -m option, a merge will be performed. | |
617 |
|
617 | |||
618 | With the -C option, local changes will be lost. |
|
618 | With the -C option, local changes will be lost. | |
619 |
|
619 | |||
620 | options: |
|
620 | options: | |
621 | -m, --merge allow merging of branches |
|
621 | -m, --merge allow merging of branches | |
622 | -C, --clean overwrite locally modified files |
|
622 | -C, --clean overwrite locally modified files | |
623 |
|
623 | |||
624 | aliases: up checkout co |
|
624 | aliases: up checkout co | |
625 |
|
625 | |||
626 | verify:: |
|
626 | verify:: | |
627 | Verify the integrity of the current repository. |
|
627 | Verify the integrity of the current repository. | |
628 |
|
628 | |||
629 | This will perform an extensive check of the repository's |
|
629 | This will perform an extensive check of the repository's | |
630 | integrity, validating the hashes and checksums of each entry in |
|
630 | integrity, validating the hashes and checksums of each entry in | |
631 | the changelog, manifest, and tracked files, as well as the |
|
631 | the changelog, manifest, and tracked files, as well as the | |
632 | integrity of their crosslinks and indices. |
|
632 | integrity of their crosslinks and indices. | |
633 |
|
633 | |||
634 | FILE NAME PATTERNS |
|
634 | FILE NAME PATTERNS | |
635 | ------------------ |
|
635 | ------------------ | |
636 |
|
636 | |||
637 | Mercurial accepts several notations for identifying one or more |
|
637 | Mercurial accepts several notations for identifying one or more | |
638 | files at a time. |
|
638 | files at a time. | |
639 |
|
639 | |||
640 | By default, Mercurial treats filenames as shell-style extended |
|
640 | By default, Mercurial treats filenames as shell-style extended | |
641 | glob patterns. |
|
641 | glob patterns. | |
642 |
|
642 | |||
643 | Alternate pattern notations must be specified explicitly. |
|
643 | Alternate pattern notations must be specified explicitly. | |
644 |
|
644 | |||
645 | To use a plain path name without any pattern matching, start a |
|
645 | To use a plain path name without any pattern matching, start a | |
646 | name with "path:". These path names must match completely, from |
|
646 | name with "path:". These path names must match completely, from | |
647 | the root of the current repository. |
|
647 | the root of the current repository. | |
648 |
|
648 | |||
649 | To use an extended glob, start a name with "glob:". Globs are |
|
649 | To use an extended glob, start a name with "glob:". Globs are | |
650 | rooted at the current directory; a glob such as "*.c" will match |
|
650 | rooted at the current directory; a glob such as "*.c" will match | |
651 | files ending in ".c" in the current directory only. |
|
651 | files ending in ".c" in the current directory only. | |
652 |
|
652 | |||
653 | The supported glob syntax extensions are "**" to match any string |
|
653 | The supported glob syntax extensions are "**" to match any string | |
654 | across path separators, and "{a,b}" to mean "a or b". |
|
654 | across path separators, and "{a,b}" to mean "a or b". | |
655 |
|
655 | |||
656 | To use a Perl/Python regular expression, start a name with "re:". |
|
656 | To use a Perl/Python regular expression, start a name with "re:". | |
657 | Regexp pattern matching is anchored at the root of the repository. |
|
657 | Regexp pattern matching is anchored at the root of the repository. | |
658 |
|
658 | |||
659 | Plain examples: |
|
659 | Plain examples: | |
660 |
|
660 | |||
661 | path:foo/bar a name bar in a directory named foo in the root of |
|
661 | path:foo/bar a name bar in a directory named foo in the root of | |
662 | the repository |
|
662 | the repository | |
663 | path:path:name a file or directory named "path:name" |
|
663 | path:path:name a file or directory named "path:name" | |
664 |
|
664 | |||
665 | Glob examples: |
|
665 | Glob examples: | |
666 |
|
666 | |||
667 | glob:*.c any name ending in ".c" in the current directory |
|
667 | glob:*.c any name ending in ".c" in the current directory | |
668 | *.c any name ending in ".c" in the current directory |
|
668 | *.c any name ending in ".c" in the current directory | |
669 | **.c any name ending in ".c" in the current directory, or |
|
669 | **.c any name ending in ".c" in the current directory, or | |
670 | any subdirectory |
|
670 | any subdirectory | |
671 | foo/*.c any name ending in ".c" in the directory foo |
|
671 | foo/*.c any name ending in ".c" in the directory foo | |
672 | foo/**.c any name ending in ".c" in the directory foo, or any |
|
672 | foo/**.c any name ending in ".c" in the directory foo, or any | |
673 | subdirectory |
|
673 | subdirectory | |
674 |
|
674 | |||
675 | Regexp examples: |
|
675 | Regexp examples: | |
676 |
|
676 | |||
677 | re:.*\.c$ any name ending in ".c", anywhere in the repository |
|
677 | re:.*\.c$ any name ending in ".c", anywhere in the repository | |
678 |
|
678 | |||
679 |
|
679 | |||
680 | SPECIFYING SINGLE REVISIONS |
|
680 | SPECIFYING SINGLE REVISIONS | |
681 | --------------------------- |
|
681 | --------------------------- | |
682 |
|
682 | |||
683 | Mercurial accepts several notations for identifying individual |
|
683 | Mercurial accepts several notations for identifying individual | |
684 | revisions. |
|
684 | revisions. | |
685 |
|
685 | |||
686 | A plain integer is treated as a revision number. Negative |
|
686 | A plain integer is treated as a revision number. Negative | |
687 | integers are treated as offsets from the tip, with -1 denoting the |
|
687 | integers are treated as offsets from the tip, with -1 denoting the | |
688 | tip. |
|
688 | tip. | |
689 |
|
689 | |||
690 | A 40-digit hexadecimal string is treated as a unique revision |
|
690 | A 40-digit hexadecimal string is treated as a unique revision | |
691 | identifier. |
|
691 | identifier. | |
692 |
|
692 | |||
693 | A hexadecimal string less than 40 characters long is treated as a |
|
693 | A hexadecimal string less than 40 characters long is treated as a | |
694 | unique revision identifier, and referred to as a short-form |
|
694 | unique revision identifier, and referred to as a short-form | |
695 | identifier. A short-form identifier is only valid if it is the |
|
695 | identifier. A short-form identifier is only valid if it is the | |
696 | prefix of one full-length identifier. |
|
696 | prefix of one full-length identifier. | |
697 |
|
697 | |||
698 | Any other string is treated as a tag name, which is a symbolic |
|
698 | Any other string is treated as a tag name, which is a symbolic | |
699 | name associated with a revision identifier. Tag names may not |
|
699 | name associated with a revision identifier. Tag names may not | |
700 | contain the ":" character. |
|
700 | contain the ":" character. | |
701 |
|
701 | |||
702 | The reserved name "tip" is a special tag that always identifies |
|
702 | The reserved name "tip" is a special tag that always identifies | |
703 | the most recent revision. |
|
703 | the most recent revision. | |
704 |
|
704 | |||
705 | SPECIFYING MULTIPLE REVISIONS |
|
705 | SPECIFYING MULTIPLE REVISIONS | |
706 | ----------------------------- |
|
706 | ----------------------------- | |
707 |
|
707 | |||
708 | When Mercurial accepts more than one revision, they may be |
|
708 | When Mercurial accepts more than one revision, they may be | |
709 | specified individually, or provided as a continuous range, |
|
709 | specified individually, or provided as a continuous range, | |
710 | separated by the ":" character. |
|
710 | separated by the ":" character. | |
711 |
|
711 | |||
712 | The syntax of range notation is [BEGIN]:[END], where BEGIN and END |
|
712 | The syntax of range notation is [BEGIN]:[END], where BEGIN and END | |
713 | are revision identifiers. Both BEGIN and END are optional. If |
|
713 | are revision identifiers. Both BEGIN and END are optional. If | |
714 | BEGIN is not specified, it defaults to revision number 0. If END |
|
714 | BEGIN is not specified, it defaults to revision number 0. If END | |
715 | is not specified, it defaults to the tip. The range ":" thus |
|
715 | is not specified, it defaults to the tip. The range ":" thus | |
716 | means "all revisions". |
|
716 | means "all revisions". | |
717 |
|
717 | |||
718 | If BEGIN is greater than END, revisions are treated in reverse |
|
718 | If BEGIN is greater than END, revisions are treated in reverse | |
719 | order. |
|
719 | order. | |
720 |
|
720 | |||
721 | A range acts as a closed interval. This means that a range of 3:5 |
|
721 | A range acts as a closed interval. This means that a range of 3:5 | |
722 | gives 3, 4 and 5. Similarly, a range of 4:2 gives 4, 3, and 2. |
|
722 | gives 3, 4 and 5. Similarly, a range of 4:2 gives 4, 3, and 2. | |
723 |
|
723 | |||
724 | ENVIRONMENT VARIABLES |
|
724 | ENVIRONMENT VARIABLES | |
725 | --------------------- |
|
725 | --------------------- | |
726 |
|
726 | |||
727 | HGEDITOR:: |
|
727 | HGEDITOR:: | |
728 | This is the name of the editor to use when committing. Defaults to the |
|
728 | This is the name of the editor to use when committing. Defaults to the | |
729 | value of EDITOR. |
|
729 | value of EDITOR. | |
730 |
|
730 | |||
731 | (deprecated, use .hgrc) |
|
731 | (deprecated, use .hgrc) | |
732 |
|
732 | |||
733 | HGMERGE:: |
|
733 | HGMERGE:: | |
734 | An executable to use for resolving merge conflicts. The program |
|
734 | An executable to use for resolving merge conflicts. The program | |
735 | will be executed with three arguments: local file, remote file, |
|
735 | will be executed with three arguments: local file, remote file, | |
736 | ancestor file. |
|
736 | ancestor file. | |
737 |
|
737 | |||
738 | The default program is "hgmerge", which is a shell script provided |
|
738 | The default program is "hgmerge", which is a shell script provided | |
739 | by Mercurial with some sensible defaults. |
|
739 | by Mercurial with some sensible defaults. | |
740 |
|
740 | |||
741 | (deprecated, use .hgrc) |
|
741 | (deprecated, use .hgrc) | |
742 |
|
742 | |||
743 | HGUSER:: |
|
743 | HGUSER:: | |
744 | This is the string used for the author of a commit. |
|
744 | This is the string used for the author of a commit. | |
745 |
|
745 | |||
746 | (deprecated, use .hgrc) |
|
746 | (deprecated, use .hgrc) | |
747 |
|
747 | |||
748 | EMAIL:: |
|
748 | EMAIL:: | |
749 | If HGUSER is not set, this will be used as the author for a commit. |
|
749 | If HGUSER is not set, this will be used as the author for a commit. | |
750 |
|
750 | |||
751 | LOGNAME:: |
|
751 | LOGNAME:: | |
752 | If neither HGUSER nor EMAIL is set, LOGNAME will be used (with |
|
752 | If neither HGUSER nor EMAIL is set, LOGNAME will be used (with | |
753 | '@hostname' appended) as the author value for a commit. |
|
753 | '@hostname' appended) as the author value for a commit. | |
754 |
|
754 | |||
755 | EDITOR:: |
|
755 | EDITOR:: | |
756 | This is the name of the editor used in the hgmerge script. It will be |
|
756 | This is the name of the editor used in the hgmerge script. It will be | |
757 | used for commit messages if HGEDITOR isn't set. Defaults to 'vi'. |
|
757 | used for commit messages if HGEDITOR isn't set. Defaults to 'vi'. | |
758 |
|
758 | |||
759 | PYTHONPATH:: |
|
759 | PYTHONPATH:: | |
760 | This is used by Python to find imported modules and may need to be set |
|
760 | This is used by Python to find imported modules and may need to be set | |
761 | appropriately if Mercurial is not installed system-wide. |
|
761 | appropriately if Mercurial is not installed system-wide. | |
762 |
|
762 | |||
763 | FILES |
|
763 | FILES | |
764 | ----- |
|
764 | ----- | |
765 | .hgignore:: |
|
765 | .hgignore:: | |
766 | This file contains regular expressions (one per line) that describe file |
|
766 | This file contains regular expressions (one per line) that describe file | |
767 | names that should be ignored by hg. |
|
767 | names that should be ignored by hg. | |
768 |
|
768 | |||
769 | .hgtags:: |
|
769 | .hgtags:: | |
770 | This file contains changeset hash values and text tag names (one of each |
|
770 | This file contains changeset hash values and text tag names (one of each | |
771 | separated by spaces) that correspond to tagged versions of the repository |
|
771 | separated by spaces) that correspond to tagged versions of the repository | |
772 | contents. |
|
772 | contents. | |
773 |
|
773 | |||
774 | /etc/mercurial/hgrc, $HOME/.hgrc, .hg/hgrc:: |
|
774 | /etc/mercurial/hgrc, $HOME/.hgrc, .hg/hgrc:: | |
775 | This file contains defaults and configuration. Values in .hg/hgrc |
|
775 | This file contains defaults and configuration. Values in .hg/hgrc | |
776 | override those in $HOME/.hgrc, and these override settings made in the |
|
776 | override those in $HOME/.hgrc, and these override settings made in the | |
777 | global /etc/mercurial/hgrc configuration. See hgrc(5) for details of |
|
777 | global /etc/mercurial/hgrc configuration. See hgrc(5) for details of | |
778 | the contents and format of these files. |
|
778 | the contents and format of these files. | |
779 |
|
779 | |||
780 | BUGS |
|
780 | BUGS | |
781 | ---- |
|
781 | ---- | |
782 | Probably lots, please post them to the mailing list (See Resources below) |
|
782 | Probably lots, please post them to the mailing list (See Resources below) | |
783 | when you find them. |
|
783 | when you find them. | |
784 |
|
784 | |||
785 | SEE ALSO |
|
785 | SEE ALSO | |
786 | -------- |
|
786 | -------- | |
787 | hgrc(5) |
|
787 | hgrc(5) | |
788 |
|
788 | |||
789 | AUTHOR |
|
789 | AUTHOR | |
790 | ------ |
|
790 | ------ | |
791 | Written by Matt Mackall <mpm@selenic.com> |
|
791 | Written by Matt Mackall <mpm@selenic.com> | |
792 |
|
792 | |||
793 | RESOURCES |
|
793 | RESOURCES | |
794 | --------- |
|
794 | --------- | |
795 | http://selenic.com/mercurial[Main Web Site] |
|
795 | http://selenic.com/mercurial[Main Web Site] | |
796 |
|
796 | |||
797 | http://www.serpentine.com/mercurial[Wiki site] |
|
797 | http://www.serpentine.com/mercurial[Wiki site] | |
798 |
|
798 | |||
799 | http://selenic.com/hg[Source code repository] |
|
799 | http://selenic.com/hg[Source code repository] | |
800 |
|
800 | |||
801 | http://selenic.com/mailman/listinfo/mercurial[Mailing list] |
|
801 | http://selenic.com/mailman/listinfo/mercurial[Mailing list] | |
802 |
|
802 | |||
803 | COPYING |
|
803 | COPYING | |
804 | ------- |
|
804 | ------- | |
805 | Copyright (C) 2005 Matt Mackall. |
|
805 | Copyright \(C) 2005 Matt Mackall. | |
806 | Free use of this software is granted under the terms of the GNU General |
|
806 | Free use of this software is granted under the terms of the GNU General | |
807 | Public License (GPL). |
|
807 | Public License (GPL). |
@@ -1,35 +1,35 | |||||
1 | HGMERGE(1) |
|
1 | HGMERGE(1) | |
2 | ========== |
|
2 | ========== | |
3 | Matt Mackall <mpm@selenic.com> |
|
3 | Matt Mackall <mpm@selenic.com> | |
4 | v0.1, 27 May 2005 |
|
4 | v0.1, 27 May 2005 | |
5 |
|
5 | |||
6 | NAME |
|
6 | NAME | |
7 | ---- |
|
7 | ---- | |
8 | hgmerge - default wrapper to merge files in Mercurial SCM system |
|
8 | hgmerge - default wrapper to merge files in Mercurial SCM system | |
9 |
|
9 | |||
10 | SYNOPSIS |
|
10 | SYNOPSIS | |
11 | -------- |
|
11 | -------- | |
12 | 'hgmerge' local ancestor remote |
|
12 | 'hgmerge' local ancestor remote | |
13 |
|
13 | |||
14 | DESCRIPTION |
|
14 | DESCRIPTION | |
15 | ----------- |
|
15 | ----------- | |
16 | The hgmerge(1) command provides a graphical interface to merge files in the |
|
16 | The hgmerge(1) command provides a graphical interface to merge files in the | |
17 | Mercurial system. It is a simple wrapper around kdiff3, merge(1) and tkdiff(1), |
|
17 | Mercurial system. It is a simple wrapper around kdiff3, merge(1) and tkdiff(1), | |
18 | or simply diff(1) and patch(1) depending on what is present on the system. |
|
18 | or simply diff(1) and patch(1) depending on what is present on the system. | |
19 |
|
19 | |||
20 | hgmerge(1) is used by the Mercurial SCM if the environment variable HGMERGE is |
|
20 | hgmerge(1) is used by the Mercurial SCM if the environment variable HGMERGE is | |
21 | not set. |
|
21 | not set. | |
22 |
|
22 | |||
23 | AUTHOR |
|
23 | AUTHOR | |
24 | ------ |
|
24 | ------ | |
25 | Written by Vincent Danjean <Vincent.Danjean@free.fr> |
|
25 | Written by Vincent Danjean <Vincent.Danjean@free.fr> | |
26 |
|
26 | |||
27 | SEE ALSO |
|
27 | SEE ALSO | |
28 | -------- |
|
28 | -------- | |
29 | hg(1) - the command line interface to Mercurial SCM |
|
29 | hg(1) - the command line interface to Mercurial SCM | |
30 |
|
30 | |||
31 | COPYING |
|
31 | COPYING | |
32 | ------- |
|
32 | ------- | |
33 | Copyright (C) 2005 Matt Mackall. |
|
33 | Copyright \(C) 2005 Matt Mackall. | |
34 | Free use of this software is granted under the terms of the GNU General |
|
34 | Free use of this software is granted under the terms of the GNU General | |
35 | Public License (GPL). |
|
35 | Public License (GPL). |
General Comments 0
You need to be logged in to leave comments.
Login now