##// END OF EJS Templates
updated manpage for new options of status
TK Soh -
r1088:39b916b1 default
parent child Browse files
Show More
@@ -1,683 +1,685 b''
1 HG(1)
1 HG(1)
2 =====
2 =====
3 Matt Mackall <mpm@selenic.com>
3 Matt Mackall <mpm@selenic.com>
4
4
5 NAME
5 NAME
6 ----
6 ----
7 hg - Mercurial source code management system
7 hg - Mercurial source code management system
8
8
9 SYNOPSIS
9 SYNOPSIS
10 --------
10 --------
11 'hg' [-v -d -q -y] <command> [command options] [files]
11 'hg' [-v -d -q -y] <command> [command options] [files]
12
12
13 DESCRIPTION
13 DESCRIPTION
14 -----------
14 -----------
15 The hg(1) command provides a command line interface to the Mercurial system.
15 The hg(1) command provides a command line interface to the Mercurial system.
16
16
17 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 cat <file> [revision]::
109 cat <file> [revision]::
110 Output to stdout the given revision for the specified file.
110 Output to stdout the given revision for the specified file.
111
111
112 If no revision is given then the tip is used.
112 If no revision is given then the tip is used.
113
113
114 clone [-U] <source> [dest]::
114 clone [-U] <source> [dest]::
115 Create a copy of an existing repository in a new directory.
115 Create a copy of an existing repository in a new directory.
116
116
117 If no destination directory name is specified, it defaults to the
117 If no destination directory name is specified, it defaults to the
118 basename of the source.
118 basename of the source.
119
119
120 The source is added to the new repository's .hg/hgrc file to be used in
120 The source is added to the new repository's .hg/hgrc file to be used in
121 future pulls.
121 future pulls.
122
122
123 For efficiency, hardlinks are used for cloning whenever the
123 For efficiency, hardlinks are used for cloning whenever the
124 source and destination are on the same filesystem.
124 source and destination are on the same filesystem.
125
125
126 options:
126 options:
127 -U, --noupdate do not update the new working directory
127 -U, --noupdate do not update the new working directory
128 -e, --ssh specify ssh command to use
128 -e, --ssh specify ssh command to use
129 --remotecmd specify hg command to run on the remote side
129 --remotecmd specify hg command to run on the remote side
130
130
131 commit [options] [files...]::
131 commit [options] [files...]::
132 Commit changes to the given files into the repository.
132 Commit changes to the given files into the repository.
133
133
134 If a list of files is omitted, all changes reported by "hg status"
134 If a list of files is omitted, all changes reported by "hg status"
135 from the root of the repository will be commited.
135 from the root of the repository will be commited.
136
136
137 The HGEDITOR or EDITOR environment variables are used to start an
137 The HGEDITOR or EDITOR environment variables are used to start an
138 editor to add a commit comment.
138 editor to add a commit comment.
139
139
140 Options:
140 Options:
141
141
142 -A, --addremove run addremove during commit
142 -A, --addremove run addremove during commit
143 -I, --include <pat> include names matching the given patterns
143 -I, --include <pat> include names matching the given patterns
144 -X, --exclude <pat> exclude names matching the given patterns
144 -X, --exclude <pat> exclude names matching the given patterns
145 -m, --message <text> use <text> as commit message
145 -m, --message <text> use <text> as commit message
146 -l, --logfile <file> read the commit message from <file>
146 -l, --logfile <file> read the commit message from <file>
147 -d, --date <datecode> record datecode as commit date
147 -d, --date <datecode> record datecode as commit date
148 -u, --user <user> record user as commiter
148 -u, --user <user> record user as commiter
149
149
150 aliases: ci
150 aliases: ci
151
151
152 copy <source> <dest>::
152 copy <source> <dest>::
153 Mark <dest> file as a copy or rename of a <source> one
153 Mark <dest> file as a copy or rename of a <source> one
154
154
155 This command takes effect for the next commit.
155 This command takes effect for the next commit.
156
156
157 diff [-a] [-r revision] [-r revision] [files ...]::
157 diff [-a] [-r revision] [-r revision] [files ...]::
158 Show differences between revisions for the specified files.
158 Show differences between revisions for the specified files.
159
159
160 Differences between files are shown using the unified diff format.
160 Differences between files are shown using the unified diff format.
161
161
162 When two revision arguments are given, then changes are shown
162 When two revision arguments are given, then changes are shown
163 between those revisions. If only one revision is specified then
163 between those revisions. If only one revision is specified then
164 that revision is compared to the working directory, and, when no
164 that revision is compared to the working directory, and, when no
165 revisions are specified, the working directory files are compared
165 revisions are specified, the working directory files are compared
166 to its parent.
166 to its parent.
167
167
168 Without the -a option, diff will avoid generating diffs of files
168 Without the -a option, diff will avoid generating diffs of files
169 it detects as binary. With -a, diff will generate a diff anyway,
169 it detects as binary. With -a, diff will generate a diff anyway,
170 probably with undesirable results.
170 probably with undesirable results.
171
171
172 options:
172 options:
173 -a, --text treat all files as text
173 -a, --text treat all files as text
174 -I, --include <pat> include names matching the given patterns
174 -I, --include <pat> include names matching the given patterns
175 -X, --exclude <pat> exclude names matching the given patterns
175 -X, --exclude <pat> exclude names matching the given patterns
176
176
177 export [-o filespec] [revision] ...::
177 export [-o filespec] [revision] ...::
178 Print the changeset header and diffs for one or more revisions.
178 Print the changeset header and diffs for one or more revisions.
179
179
180 The information shown in the changeset header is: author,
180 The information shown in the changeset header is: author,
181 changeset hash, parent and commit comment.
181 changeset hash, parent and commit comment.
182
182
183 Output may be to a file, in which case the name of the file is
183 Output may be to a file, in which case the name of the file is
184 given using a format string. The formatting rules are as follows:
184 given using a format string. The formatting rules are as follows:
185
185
186 %% literal "%" character
186 %% literal "%" character
187 %H changeset hash (40 bytes of hexadecimal)
187 %H changeset hash (40 bytes of hexadecimal)
188 %N number of patches being generated
188 %N number of patches being generated
189 %R changeset revision number
189 %R changeset revision number
190 %b basename of the exporting repository
190 %b basename of the exporting repository
191 %h short-form changeset hash (12 bytes of hexadecimal)
191 %h short-form changeset hash (12 bytes of hexadecimal)
192 %n zero-padded sequence number, starting at 1
192 %n zero-padded sequence number, starting at 1
193 %r zero-padded changeset revision number
193 %r zero-padded changeset revision number
194
194
195 Without the -a option, export will avoid generating diffs of files
195 Without the -a option, export will avoid generating diffs of files
196 it detects as binary. With -a, export will generate a diff anyway,
196 it detects as binary. With -a, export will generate a diff anyway,
197 probably with undesirable results.
197 probably with undesirable results.
198
198
199 options:
199 options:
200 -a, --text treat all files as text
200 -a, --text treat all files as text
201 -o, --output <filespec> print output to file with formatted named
201 -o, --output <filespec> print output to file with formatted named
202
202
203 forget [options] [files]::
203 forget [options] [files]::
204 Undo an 'hg add' scheduled for the next commit.
204 Undo an 'hg add' scheduled for the next commit.
205
205
206 options:
206 options:
207 -I, --include <pat> include names matching the given patterns
207 -I, --include <pat> include names matching the given patterns
208 -X, --exclude <pat> exclude names matching the given patterns
208 -X, --exclude <pat> exclude names matching the given patterns
209
209
210 heads::
210 heads::
211 Show all repository head changesets.
211 Show all repository head changesets.
212
212
213 Repository "heads" are changesets that don't have children
213 Repository "heads" are changesets that don't have children
214 changesets. They are where development generally takes place and
214 changesets. They are where development generally takes place and
215 are the usual targets for update and merge operations.
215 are the usual targets for update and merge operations.
216
216
217 identify::
217 identify::
218 Print a short summary of the current state of the repo.
218 Print a short summary of the current state of the repo.
219
219
220 This summary identifies the repository state using one or two parent
220 This summary identifies the repository state using one or two parent
221 hash identifiers, followed by a "+" if there are uncommitted changes
221 hash identifiers, followed by a "+" if there are uncommitted changes
222 in the working directory, followed by a list of tags for this revision.
222 in the working directory, followed by a list of tags for this revision.
223
223
224 aliases: id
224 aliases: id
225
225
226 import [-p <n> -b <base> -f] <patches>::
226 import [-p <n> -b <base> -f] <patches>::
227 Import a list of patches and commit them individually.
227 Import a list of patches and commit them individually.
228
228
229 options:
229 options:
230 -p, --strip <n> directory strip option for patch. This has the same
230 -p, --strip <n> directory strip option for patch. This has the same
231 meaning as the corresponding patch option
231 meaning as the corresponding patch option
232 -b <path> base directory to read patches from
232 -b <path> base directory to read patches from
233 -f, --force skip check for outstanding uncommitted changes
233 -f, --force skip check for outstanding uncommitted changes
234
234
235 aliases: patch
235 aliases: patch
236
236
237 incoming [source]::
237 incoming [source]::
238 Show new changesets found in the specified repo or the default
238 Show new changesets found in the specified repo or the default
239 pull repo. These are the changesets that would be pulled if a pull
239 pull repo. These are the changesets that would be pulled if a pull
240 was requested.
240 was requested.
241
241
242 Currently only local repositories are supported.
242 Currently only local repositories are supported.
243
243
244 aliases: in
244 aliases: in
245
245
246 init [dest]::
246 init [dest]::
247 Initialize a new repository in the given directory. If the given
247 Initialize a new repository in the given directory. If the given
248 directory does not exist, it is created.
248 directory does not exist, it is created.
249
249
250 If no directory is given, the current directory is used.
250 If no directory is given, the current directory is used.
251
251
252 locate [options] [files]::
252 locate [options] [files]::
253 Print all files under Mercurial control whose names match the
253 Print all files under Mercurial control whose names match the
254 given patterns.
254 given patterns.
255
255
256 This command searches the current directory and its
256 This command searches the current directory and its
257 subdirectories. To search an entire repository, move to the root
257 subdirectories. To search an entire repository, move to the root
258 of the repository.
258 of the repository.
259
259
260 If no patterns are given to match, this command prints all file
260 If no patterns are given to match, this command prints all file
261 names.
261 names.
262
262
263 If you want to feed the output of this command into the "xargs"
263 If you want to feed the output of this command into the "xargs"
264 command, use the "-0" option to both this command and "xargs".
264 command, use the "-0" option to both this command and "xargs".
265 This will avoid the problem of "xargs" treating single filenames
265 This will avoid the problem of "xargs" treating single filenames
266 that contain white space as multiple file names.
266 that contain white space as multiple file names.
267
267
268 options:
268 options:
269
269
270 -0, --print0 end filenames with NUL, for use with xargs
270 -0, --print0 end filenames with NUL, for use with xargs
271 -f, --fullpath print complete paths from the filesystem root
271 -f, --fullpath print complete paths from the filesystem root
272 -I, --include <pat> include names matching the given patterns
272 -I, --include <pat> include names matching the given patterns
273 -r, --rev <rev> search the repository as it stood at rev
273 -r, --rev <rev> search the repository as it stood at rev
274 -X, --exclude <pat> exclude names matching the given patterns
274 -X, --exclude <pat> exclude names matching the given patterns
275
275
276 log [-r revision ...] [-p] [files]::
276 log [-r revision ...] [-p] [files]::
277 Print the revision history of the specified files or the entire project.
277 Print the revision history of the specified files or the entire project.
278
278
279 By default this command outputs: changeset id and hash, tags,
279 By default this command outputs: changeset id and hash, tags,
280 parents, user, date and time, and a summary for each commit. The
280 parents, user, date and time, and a summary for each commit. The
281 -v switch adds some more detail, such as changed files, manifest
281 -v switch adds some more detail, such as changed files, manifest
282 hashes or message signatures.
282 hashes or message signatures.
283
283
284 options:
284 options:
285 -I, --include <pat> include names matching the given patterns
285 -I, --include <pat> include names matching the given patterns
286 -X, --exclude <pat> exclude names matching the given patterns
286 -X, --exclude <pat> exclude names matching the given patterns
287 -r, --rev <A> show the specified revision or range
287 -r, --rev <A> show the specified revision or range
288 -p, --patch show patch
288 -p, --patch show patch
289
289
290 aliases: history
290 aliases: history
291
291
292 manifest [revision]::
292 manifest [revision]::
293 Print a list of version controlled files for the given revision.
293 Print a list of version controlled files for the given revision.
294
294
295 The manifest is the list of files being version controlled. If no revision
295 The manifest is the list of files being version controlled. If no revision
296 is given then the tip is used.
296 is given then the tip is used.
297
297
298 outgoing [dest]::
298 outgoing [dest]::
299 Show changesets not found in the specified destination repo or the
299 Show changesets not found in the specified destination repo or the
300 default push repo. These are the changesets that would be pushed
300 default push repo. These are the changesets that would be pushed
301 if a push was requested.
301 if a push was requested.
302
302
303 aliases: out
303 aliases: out
304
304
305 parents::
305 parents::
306 Print the working directory's parent revisions.
306 Print the working directory's parent revisions.
307
307
308 paths [NAME]::
308 paths [NAME]::
309 Show definition of symbolic path name NAME. If no name is given, show
309 Show definition of symbolic path name NAME. If no name is given, show
310 definition of available names.
310 definition of available names.
311
311
312 Path names are defined in the [paths] section of /etc/mercurial/hgrc
312 Path names are defined in the [paths] section of /etc/mercurial/hgrc
313 and $HOME/.hgrc. If run inside a repository, .hg/hgrc is used, too.
313 and $HOME/.hgrc. If run inside a repository, .hg/hgrc is used, too.
314
314
315 pull <repository path>::
315 pull <repository path>::
316 Pull changes from a remote repository to a local one.
316 Pull changes from a remote repository to a local one.
317
317
318 This finds all changes from the repository at the specified path
318 This finds all changes from the repository at the specified path
319 or URL and adds them to the local repository. By default, this
319 or URL and adds them to the local repository. By default, this
320 does not update the copy of the project in the working directory.
320 does not update the copy of the project in the working directory.
321
321
322 Valid URLs are of the form:
322 Valid URLs are of the form:
323
323
324 local/filesystem/path
324 local/filesystem/path
325 http://[user@]host[:port][/path]
325 http://[user@]host[:port][/path]
326 https://[user@]host[:port][/path]
326 https://[user@]host[:port][/path]
327 ssh://[user@]host[:port][/path]
327 ssh://[user@]host[:port][/path]
328
328
329 SSH requires an accessible shell account on the destination
329 SSH requires an accessible shell account on the destination
330 machine and a copy of hg in the remote path.
330 machine and a copy of hg in the remote path.
331
331
332 options:
332 options:
333 -u, --update update the working directory to tip after pull
333 -u, --update update the working directory to tip after pull
334 -e, --ssh specify ssh command to use
334 -e, --ssh specify ssh command to use
335 --remotecmd specify hg command to run on the remote side
335 --remotecmd specify hg command to run on the remote side
336
336
337 push <destination>::
337 push <destination>::
338 Push changes from the local repository to the given destination.
338 Push changes from the local repository to the given destination.
339
339
340 This is the symmetrical operation for pull. It helps to move
340 This is the symmetrical operation for pull. It helps to move
341 changes from the current repository to a different one. If the
341 changes from the current repository to a different one. If the
342 destination is local this is identical to a pull in that directory
342 destination is local this is identical to a pull in that directory
343 from the current one.
343 from the current one.
344
344
345 By default, push will refuse to run if it detects the result would
345 By default, push will refuse to run if it detects the result would
346 increase the number of remote heads. This generally indicates the
346 increase the number of remote heads. This generally indicates the
347 the client has forgotten to sync and merge before pushing.
347 the client has forgotten to sync and merge before pushing.
348
348
349 Valid URLs are of the form:
349 Valid URLs are of the form:
350
350
351 local/filesystem/path
351 local/filesystem/path
352 ssh://[user@]host[:port][/path]
352 ssh://[user@]host[:port][/path]
353
353
354 SSH requires an accessible shell account on the destination
354 SSH requires an accessible shell account on the destination
355 machine and a copy of hg in the remote path.
355 machine and a copy of hg in the remote path.
356
356
357 options:
357 options:
358
358
359 -f, --force force update
359 -f, --force force update
360 -e, --ssh specify ssh command to use
360 -e, --ssh specify ssh command to use
361 --remotecmd specify hg command to run on the remote side
361 --remotecmd specify hg command to run on the remote side
362
362
363 rawcommit [-p -d -u -F -m -l]::
363 rawcommit [-p -d -u -F -m -l]::
364 Lowlevel commit, for use in helper scripts.
364 Lowlevel commit, for use in helper scripts.
365
365
366 This command is not intended to be used by normal users, as it is
366 This command is not intended to be used by normal users, as it is
367 primarily useful for importing from other SCMs.
367 primarily useful for importing from other SCMs.
368
368
369 recover::
369 recover::
370 Recover from an interrupted commit or pull.
370 Recover from an interrupted commit or pull.
371
371
372 This command tries to fix the repository status after an interrupted
372 This command tries to fix the repository status after an interrupted
373 operation. It should only be necessary when Mercurial suggests it.
373 operation. It should only be necessary when Mercurial suggests it.
374
374
375 remove [files ...]::
375 remove [files ...]::
376 Schedule the indicated files for removal from the repository.
376 Schedule the indicated files for removal from the repository.
377
377
378 This command schedules the files to be removed at the next commit.
378 This command schedules the files to be removed at the next commit.
379 This only removes files from the current branch, not from the
379 This only removes files from the current branch, not from the
380 entire project history.
380 entire project history.
381
381
382 aliases: rm
382 aliases: rm
383
383
384 revert [names ...]::
384 revert [names ...]::
385 Revert any uncommitted modifications made to the named files or
385 Revert any uncommitted modifications made to the named files or
386 directories. This restores the contents of the affected files to
386 directories. This restores the contents of the affected files to
387 an unmodified state.
387 an unmodified state.
388
388
389 If a file has been deleted, it is recreated. If the executable
389 If a file has been deleted, it is recreated. If the executable
390 mode of a file was changed, it is reset.
390 mode of a file was changed, it is reset.
391
391
392 If a directory is given, all files in that directory and its
392 If a directory is given, all files in that directory and its
393 subdirectories are reverted.
393 subdirectories are reverted.
394
394
395 If no arguments are given, all files in the current directory and
395 If no arguments are given, all files in the current directory and
396 its subdirectories are reverted.
396 its subdirectories are reverted.
397
397
398 options:
398 options:
399 -r, --rev <rev> revision to revert to
399 -r, --rev <rev> revision to revert to
400 -n, --nonrecursive do not recurse into subdirectories
400 -n, --nonrecursive do not recurse into subdirectories
401
401
402 root::
402 root::
403 Print the root directory of the current repository.
403 Print the root directory of the current repository.
404
404
405 serve [options]::
405 serve [options]::
406 Start a local HTTP repository browser and pull server.
406 Start a local HTTP repository browser and pull server.
407
407
408 By default, the server logs accesses to stdout and errors to
408 By default, the server logs accesses to stdout and errors to
409 stderr. Use the "-A" and "-E" options to log to files.
409 stderr. Use the "-A" and "-E" options to log to files.
410
410
411 options:
411 options:
412 -A, --accesslog <file> name of access log file to write to
412 -A, --accesslog <file> name of access log file to write to
413 -E, --errorlog <file> name of error log file to write to
413 -E, --errorlog <file> name of error log file to write to
414 -a, --address <addr> address to use
414 -a, --address <addr> address to use
415 -p, --port <n> port to use (default: 8000)
415 -p, --port <n> port to use (default: 8000)
416 -n, --name <name> name to show in web pages (default: working dir)
416 -n, --name <name> name to show in web pages (default: working dir)
417 -t, --templatedir <path> web templates to use
417 -t, --templatedir <path> web templates to use
418 -6, --ipv6 use IPv6 in addition to IPv4
418 -6, --ipv6 use IPv6 in addition to IPv4
419
419
420 status [options] [files]::
420 status [options] [files]::
421 Show changed files in the working directory. If no names are
421 Show changed files in the working directory. If no names are
422 given, all files are shown. Otherwise, only files matching the
422 given, all files are shown. Otherwise, only files matching the
423 given names are shown.
423 given names are shown.
424
424
425 The codes used to show the status of files are:
425 The codes used to show the status of files are:
426
426
427 M = changed
427 M = changed
428 A = added
428 A = added
429 R = removed
429 R = removed
430 ? = not tracked
430 ? = not tracked
431
431
432 options:
432 options:
433
433
434 -m, --modified show only modified files
434 -m, --modified show only modified files
435 -a, --added show only added files
435 -a, --added show only added files
436 -r, --removed show only removed files
436 -r, --removed show only removed files
437 -u, --unknown show only unknown (not tracked) files
437 -u, --unknown show only unknown (not tracked) files
438 -p, --strip strip status prefix
439 -0, --print0 end filenames with NUL, for use with xargs
438 -I, --include <pat> include names matching the given patterns
440 -I, --include <pat> include names matching the given patterns
439 -X, --exclude <pat> exclude names matching the given patterns
441 -X, --exclude <pat> exclude names matching the given patterns
440
442
441 tag [-l -m <text> -d <datecode> -u <user>] <name> [revision]::
443 tag [-l -m <text> -d <datecode> -u <user>] <name> [revision]::
442 Name a particular revision using <name>.
444 Name a particular revision using <name>.
443
445
444 Tags are used to name particular revisions of the repository and are
446 Tags are used to name particular revisions of the repository and are
445 very useful to compare different revision, to go back to significant
447 very useful to compare different revision, to go back to significant
446 earlier versions or to mark branch points as releases, etc.
448 earlier versions or to mark branch points as releases, etc.
447
449
448 If no revision is given, the tip is used.
450 If no revision is given, the tip is used.
449
451
450 To facilitate version control, distribution, and merging of tags,
452 To facilitate version control, distribution, and merging of tags,
451 they are stored as a file named ".hgtags" which is managed
453 they are stored as a file named ".hgtags" which is managed
452 similarly to other project files and can be hand-edited if
454 similarly to other project files and can be hand-edited if
453 necessary.
455 necessary.
454
456
455 options:
457 options:
456 -l, --local make the tag local
458 -l, --local make the tag local
457 -m, --message <text> message for tag commit log entry
459 -m, --message <text> message for tag commit log entry
458 -d, --date <datecode> datecode for commit
460 -d, --date <datecode> datecode for commit
459 -u, --user <user> user for commit
461 -u, --user <user> user for commit
460
462
461 Note: Local tags are not version-controlled or distributed and are
463 Note: Local tags are not version-controlled or distributed and are
462 stored in the .hg/localtags file. If there exists a local tag and
464 stored in the .hg/localtags file. If there exists a local tag and
463 a public tag with the same name, local tag is used.
465 a public tag with the same name, local tag is used.
464
466
465 tags::
467 tags::
466 List the repository tags.
468 List the repository tags.
467
469
468 This lists both regular and local tags.
470 This lists both regular and local tags.
469
471
470 tip::
472 tip::
471 Show the tip revision.
473 Show the tip revision.
472
474
473 undo::
475 undo::
474 Undo the last commit or pull transaction.
476 Undo the last commit or pull transaction.
475
477
476 Roll back the last pull or commit transaction on the
478 Roll back the last pull or commit transaction on the
477 repository, restoring the project to its earlier state.
479 repository, restoring the project to its earlier state.
478
480
479 This command should be used with care. There is only one level of
481 This command should be used with care. There is only one level of
480 undo and there is no redo.
482 undo and there is no redo.
481
483
482 This command is not intended for use on public repositories. Once
484 This command is not intended for use on public repositories. Once
483 a change is visible for pull by other users, undoing it locally is
485 a change is visible for pull by other users, undoing it locally is
484 ineffective.
486 ineffective.
485
487
486 update [-m -C] [revision]::
488 update [-m -C] [revision]::
487 Update the working directory to the specified revision.
489 Update the working directory to the specified revision.
488
490
489 By default, update will refuse to run if doing so would require
491 By default, update will refuse to run if doing so would require
490 merging or discarding local changes.
492 merging or discarding local changes.
491
493
492 With the -m option, a merge will be performed.
494 With the -m option, a merge will be performed.
493
495
494 With the -C option, local changes will be lost.
496 With the -C option, local changes will be lost.
495
497
496 options:
498 options:
497 -m, --merge allow merging of branches
499 -m, --merge allow merging of branches
498 -C, --clean overwrite locally modified files
500 -C, --clean overwrite locally modified files
499
501
500 aliases: up checkout co
502 aliases: up checkout co
501
503
502 verify::
504 verify::
503 Verify the integrity of the current repository.
505 Verify the integrity of the current repository.
504
506
505 This will perform an extensive check of the repository's
507 This will perform an extensive check of the repository's
506 integrity, validating the hashes and checksums of each entry in
508 integrity, validating the hashes and checksums of each entry in
507 the changelog, manifest, and tracked files, as well as the
509 the changelog, manifest, and tracked files, as well as the
508 integrity of their crosslinks and indices.
510 integrity of their crosslinks and indices.
509
511
510 FILE NAME PATTERNS
512 FILE NAME PATTERNS
511 ------------------
513 ------------------
512
514
513 Mercurial accepts several notations for identifying one or more
515 Mercurial accepts several notations for identifying one or more
514 file at a time.
516 file at a time.
515
517
516 By default, Mercurial treats file names as shell-style extended
518 By default, Mercurial treats file names as shell-style extended
517 glob patterns.
519 glob patterns.
518
520
519 Alternate pattern notations must be specified explicitly.
521 Alternate pattern notations must be specified explicitly.
520
522
521 To use a plain path name without any pattern matching, start a
523 To use a plain path name without any pattern matching, start a
522 name with "path:". These path names must match completely, from
524 name with "path:". These path names must match completely, from
523 the root of the current repository.
525 the root of the current repository.
524
526
525 To use an extended glob, start a name with "glob:". Globs are
527 To use an extended glob, start a name with "glob:". Globs are
526 rooted at the current directory; a glob such as "*.c" will match
528 rooted at the current directory; a glob such as "*.c" will match
527 files ending in ".c" in the current directory only.
529 files ending in ".c" in the current directory only.
528
530
529 The supported glob syntax extensions are "**" to match any string
531 The supported glob syntax extensions are "**" to match any string
530 across path separators, and "{a,b}" to mean "a or b".
532 across path separators, and "{a,b}" to mean "a or b".
531
533
532 To use a Perl/Python regular expression, start a name with "re:".
534 To use a Perl/Python regular expression, start a name with "re:".
533 Regexp pattern matching is anchored at the root of the repository.
535 Regexp pattern matching is anchored at the root of the repository.
534
536
535 Plain examples:
537 Plain examples:
536
538
537 path:foo/bar a name bar in a directory named foo in the root of
539 path:foo/bar a name bar in a directory named foo in the root of
538 the repository
540 the repository
539 path:path:name a file or directory named "path:name"
541 path:path:name a file or directory named "path:name"
540
542
541 Glob examples:
543 Glob examples:
542
544
543 glob:*.c any name ending in ".c" in the current directory
545 glob:*.c any name ending in ".c" in the current directory
544 *.c any name ending in ".c" in the current directory
546 *.c any name ending in ".c" in the current directory
545 **.c any name ending in ".c" in the current directory, or
547 **.c any name ending in ".c" in the current directory, or
546 any subdirectory
548 any subdirectory
547 foo/*.c any name ending in ".c" in the directory foo
549 foo/*.c any name ending in ".c" in the directory foo
548 foo/**.c any name ending in ".c" in the directory foo, or any
550 foo/**.c any name ending in ".c" in the directory foo, or any
549 subdirectory
551 subdirectory
550
552
551 Regexp examples:
553 Regexp examples:
552
554
553 re:.*\.c$ any name ending in ".c", anywhere in the repository
555 re:.*\.c$ any name ending in ".c", anywhere in the repository
554
556
555
557
556 SPECIFYING SINGLE REVISIONS
558 SPECIFYING SINGLE REVISIONS
557 ---------------------------
559 ---------------------------
558
560
559 Mercurial accepts several notations for identifying individual
561 Mercurial accepts several notations for identifying individual
560 revisions.
562 revisions.
561
563
562 A plain integer is treated as a revision number. Negative
564 A plain integer is treated as a revision number. Negative
563 integers are treated as offsets from the tip, with -1 denoting the
565 integers are treated as offsets from the tip, with -1 denoting the
564 tip.
566 tip.
565
567
566 A 40-digit hexadecimal string is treated as a unique revision
568 A 40-digit hexadecimal string is treated as a unique revision
567 identifier.
569 identifier.
568
570
569 A hexadecimal string less than 40 characters long is treated as a
571 A hexadecimal string less than 40 characters long is treated as a
570 unique revision identifier, and referred to as a short-form
572 unique revision identifier, and referred to as a short-form
571 identifier. A short-form identifier is only valid if it is the
573 identifier. A short-form identifier is only valid if it is the
572 prefix of one full-length identifier.
574 prefix of one full-length identifier.
573
575
574 Any other string is treated as a tag name, which is a symbolic
576 Any other string is treated as a tag name, which is a symbolic
575 name associated with a revision identifier. Tag names may not
577 name associated with a revision identifier. Tag names may not
576 contain the ":" character.
578 contain the ":" character.
577
579
578 The reserved name "tip" is a special tag that always identifies
580 The reserved name "tip" is a special tag that always identifies
579 the most recent revision.
581 the most recent revision.
580
582
581 SPECIFYING MULTIPLE REVISIONS
583 SPECIFYING MULTIPLE REVISIONS
582 -----------------------------
584 -----------------------------
583
585
584 When Mercurial accepts more than one revision, they may be
586 When Mercurial accepts more than one revision, they may be
585 specified individually, or provided as a continuous range,
587 specified individually, or provided as a continuous range,
586 separated by the ":" character.
588 separated by the ":" character.
587
589
588 The syntax of range notation is [BEGIN]:[END], where BEGIN and END
590 The syntax of range notation is [BEGIN]:[END], where BEGIN and END
589 are revision identifiers. Both BEGIN and END are optional. If
591 are revision identifiers. Both BEGIN and END are optional. If
590 BEGIN is not specified, it defaults to revision number 0. If END
592 BEGIN is not specified, it defaults to revision number 0. If END
591 is not specified, it defaults to the tip. The range ":" thus
593 is not specified, it defaults to the tip. The range ":" thus
592 means "all revisions".
594 means "all revisions".
593
595
594 If BEGIN is greater than END, revisions are treated in reverse
596 If BEGIN is greater than END, revisions are treated in reverse
595 order.
597 order.
596
598
597 A range acts as a closed interval. This means that a range of 3:5
599 A range acts as a closed interval. This means that a range of 3:5
598 gives 3, 4 and 5. Similarly, a range of 4:2 gives 4, 3, and 2.
600 gives 3, 4 and 5. Similarly, a range of 4:2 gives 4, 3, and 2.
599
601
600 ENVIRONMENT VARIABLES
602 ENVIRONMENT VARIABLES
601 ---------------------
603 ---------------------
602
604
603 HGEDITOR::
605 HGEDITOR::
604 This is the name of the editor to use when committing. Defaults to the
606 This is the name of the editor to use when committing. Defaults to the
605 value of EDITOR.
607 value of EDITOR.
606
608
607 (deprecated, use .hgrc)
609 (deprecated, use .hgrc)
608
610
609 HGMERGE::
611 HGMERGE::
610 An executable to use for resolving merge conflicts. The program
612 An executable to use for resolving merge conflicts. The program
611 will be executed with three arguments: local file, remote file,
613 will be executed with three arguments: local file, remote file,
612 ancestor file.
614 ancestor file.
613
615
614 The default program is "hgmerge", which is a shell script provided
616 The default program is "hgmerge", which is a shell script provided
615 by Mercurial with some sensible defaults.
617 by Mercurial with some sensible defaults.
616
618
617 (deprecated, use .hgrc)
619 (deprecated, use .hgrc)
618
620
619 HGUSER::
621 HGUSER::
620 This is the string used for the author of a commit.
622 This is the string used for the author of a commit.
621
623
622 (deprecated, use .hgrc)
624 (deprecated, use .hgrc)
623
625
624 EMAIL::
626 EMAIL::
625 If HGUSER is not set, this will be used as the author for a commit.
627 If HGUSER is not set, this will be used as the author for a commit.
626
628
627 LOGNAME::
629 LOGNAME::
628 If neither HGUSER nor EMAIL is set, LOGNAME will be used (with
630 If neither HGUSER nor EMAIL is set, LOGNAME will be used (with
629 '@hostname' appended) as the author value for a commit.
631 '@hostname' appended) as the author value for a commit.
630
632
631 EDITOR::
633 EDITOR::
632 This is the name of the editor used in the hgmerge script. It will be
634 This is the name of the editor used in the hgmerge script. It will be
633 used for commit messages if HGEDITOR isn't set. Defaults to 'vi'.
635 used for commit messages if HGEDITOR isn't set. Defaults to 'vi'.
634
636
635 PYTHONPATH::
637 PYTHONPATH::
636 This is used by Python to find imported modules and may need to be set
638 This is used by Python to find imported modules and may need to be set
637 appropriately if Mercurial is not installed system-wide.
639 appropriately if Mercurial is not installed system-wide.
638
640
639 FILES
641 FILES
640 -----
642 -----
641 .hgignore::
643 .hgignore::
642 This file contains regular expressions (one per line) that describe file
644 This file contains regular expressions (one per line) that describe file
643 names that should be ignored by hg.
645 names that should be ignored by hg.
644
646
645 .hgtags::
647 .hgtags::
646 This file contains changeset hash values and text tag names (one of each
648 This file contains changeset hash values and text tag names (one of each
647 separated by spaces) that correspond to tagged versions of the repository
649 separated by spaces) that correspond to tagged versions of the repository
648 contents.
650 contents.
649
651
650 /etc/mercurial/hgrc, $HOME/.hgrc, .hg/hgrc::
652 /etc/mercurial/hgrc, $HOME/.hgrc, .hg/hgrc::
651 This file contains defaults and configuration. Values in .hg/hgrc
653 This file contains defaults and configuration. Values in .hg/hgrc
652 override those in $HOME/.hgrc, and these override settings made in the
654 override those in $HOME/.hgrc, and these override settings made in the
653 global /etc/mercurial/hgrc configuration. See hgrc(5) for details of
655 global /etc/mercurial/hgrc configuration. See hgrc(5) for details of
654 the contents and format of these files.
656 the contents and format of these files.
655
657
656 BUGS
658 BUGS
657 ----
659 ----
658 Probably lots, please post them to the mailing list (See Resources below)
660 Probably lots, please post them to the mailing list (See Resources below)
659 when you find them.
661 when you find them.
660
662
661 SEE ALSO
663 SEE ALSO
662 --------
664 --------
663 hgrc(5)
665 hgrc(5)
664
666
665 AUTHOR
667 AUTHOR
666 ------
668 ------
667 Written by Matt Mackall <mpm@selenic.com>
669 Written by Matt Mackall <mpm@selenic.com>
668
670
669 RESOURCES
671 RESOURCES
670 ---------
672 ---------
671 http://selenic.com/mercurial[Main Web Site]
673 http://selenic.com/mercurial[Main Web Site]
672
674
673 http://www.serpentine.com/mercurial[Wiki site]
675 http://www.serpentine.com/mercurial[Wiki site]
674
676
675 http://selenic.com/hg[Source code repository]
677 http://selenic.com/hg[Source code repository]
676
678
677 http://selenic.com/mailman/listinfo/mercurial[Mailing list]
679 http://selenic.com/mailman/listinfo/mercurial[Mailing list]
678
680
679 COPYING
681 COPYING
680 -------
682 -------
681 Copyright (C) 2005 Matt Mackall.
683 Copyright (C) 2005 Matt Mackall.
682 Free use of this software is granted under the terms of the GNU General
684 Free use of this software is granted under the terms of the GNU General
683 Public License (GPL).
685 Public License (GPL).
General Comments 0
You need to be logged in to leave comments. Login now