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