]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/hg
games/galaxy: new mouse behavior
[plan9front.git] / sys / man / 1 / hg
1 .TH HG 1
2 .SH NAME
3 hg \- Mercurial source code management system
4 .SH SYNOPSIS
5 .B hg
6 [
7 .I globaloptions
8 ]
9 .I command
10 [
11 .I commandoptions
12 ] [
13 .I arguments
14 ]
15 .SH DESCRIPTION
16 The
17 .I hg
18 command provides a command line interface to the Mercurial system.
19 .sp
20 .SH "COMMAND ELEMENTS"
21 .PP
22 files ...
23 .RS 4
24 indicates one or more filename or relative path filenames; see
25 .I "FILE PATTERNS"
26 for information on pattern matching
27 .RE
28 .PP
29 path
30 .RS 4
31 indicates a path on the local machine
32 .RE
33 .PP
34 revision
35 .RS 4
36 indicates a changeset which can be specified as a changeset revision number, a tag, or a unique substring of the changeset hash value
37 .RE
38 .PP
39 repository path
40 .RS 4
41 either the pathname of a local repository or the URI of a remote repository. There are two available URI protocols, http:// which is fast and the static\-http:// protocol which is much slower but does not require a special server on the web host.
42 .RE
43 .SH OPTIONS
44 .PP
45 \-R, \-\-repository
46 .RS 4
47 repository root directory or symbolic path name
48 .RE
49 .PP
50 \-\-cwd
51 .RS 4
52 change working directory
53 .RE
54 .PP
55 \-y, \-\-noninteractive
56 .RS 4
57 do not prompt, assume
58 \fIyes\fR
59 for any required answers
60 .RE
61 .PP
62 \-q, \-\-quiet
63 .RS 4
64 suppress output
65 .RE
66 .PP
67 \-v, \-\-verbose
68 .RS 4
69 enable additional output
70 .RE
71 .PP
72 \-\-config
73 .RS 4
74 set/override config option
75 .RE
76 .PP
77 \-\-debug
78 .RS 4
79 enable debugging output
80 .RE
81 .PP
82 \-\-debugger
83 .RS 4
84 start debugger
85 .RE
86 .PP
87 \-\-encoding
88 .RS 4
89 set the charset encoding (default: UTF\-8)
90 .RE
91 .PP
92 \-\-encodingmode
93 .RS 4
94 set the charset encoding mode (default: strict)
95 .RE
96 .PP
97 \-\-lsprof
98 .RS 4
99 print improved command execution profile
100 .RE
101 .PP
102 \-\-traceback
103 .RS 4
104 print traceback on exception
105 .RE
106 .PP
107 \-\-time
108 .RS 4
109 time how long the command takes
110 .RE
111 .PP
112 \-\-profile
113 .RS 4
114 print command execution profile
115 .RE
116 .PP
117 \-\-version
118 .RS 4
119 output version information and exit
120 .RE
121 .PP
122 \-h, \-\-help
123 .RS 4
124 display help and exit
125 .RE
126 .SH COMMANDS
127 .PP
128 add [OPTION]... [FILE]...
129 .RS 4
130 Schedule files to be version controlled and added to the repository.
131 .sp
132 .RS 4
133 .nf
134 The files will be added to the repository at the next commit. To
135 undo an add before that, see hg revert.
136 .fi
137 .RE
138 .sp
139 .RS 4
140 .nf
141 If no names are given, add all files in the repository.
142 .fi
143 .RE
144 .sp
145 .RS 4
146 .nf
147 options:
148 \-I, \-\-include  include names matching the given patterns
149 \-X, \-\-exclude  exclude names matching the given patterns
150 \-n, \-\-dry\-run  do not perform actions, just print output
151 .fi
152 .RE
153 .RE
154 .PP
155 addremove [OPTION]... [FILE]...
156 .RS 4
157 Add all new files and remove all missing files from the repository.
158 .sp
159 .RS 4
160 .nf
161 New files are ignored if they match any of the patterns in .hgignore. As
162 with add, these changes take effect at the next commit.
163 .fi
164 .RE
165 .sp
166 .RS 4
167 .nf
168 Use the \-s option to detect renamed files.  With a parameter > 0,
169 this compares every removed file with every added file and records
170 those similar enough as renames.  This option takes a percentage
171 between 0 (disabled) and 100 (files must be identical) as its
172 parameter.  Detecting renamed files this way can be expensive.
173 .fi
174 .RE
175 .sp
176 .RS 4
177 .nf
178 options:
179 \-s, \-\-similarity  guess renamed files by similarity (0<=s<=100)
180 \-I, \-\-include     include names matching the given patterns
181 \-X, \-\-exclude     exclude names matching the given patterns
182 \-n, \-\-dry\-run     do not perform actions, just print output
183 .fi
184 .RE
185 .RE
186 .PP
187 annotate [\-r REV] [\-f] [\-a] [\-u] [\-d] [\-n] [\-c] [\-l] FILE...
188 .RS 4
189 List changes in files, showing the revision id responsible for each line
190 .sp
191 .RS 4
192 .nf
193 This command is useful to discover who did a change or when a change took
194 place.
195 .fi
196 .RE
197 .sp
198 .RS 4
199 .nf
200 Without the \-a option, annotate will avoid processing files it
201 detects as binary. With \-a, annotate will generate an annotation
202 anyway, probably with undesirable results.
203 .fi
204 .RE
205 .sp
206 .RS 4
207 .nf
208 options:
209 \-r, \-\-rev          annotate the specified revision
210 \-f, \-\-follow       follow file copies and renames
211 \-a, \-\-text         treat all files as text
212 \-u, \-\-user         list the author (long with \-v)
213 \-d, \-\-date         list the date (short with \-q)
214 \-n, \-\-number       list the revision number (default)
215 \-c, \-\-changeset    list the changeset
216 \-l, \-\-line\-number  show line number at the first appearance
217 \-I, \-\-include      include names matching the given patterns
218 \-X, \-\-exclude      exclude names matching the given patterns
219 .fi
220 .RE
221 .sp
222 .RS 4
223 .nf
224 aliases: blame
225 .fi
226 .RE
227 .RE
228 .PP
229 archive [OPTION]... DEST
230 .RS 4
231 By default, the revision used is the parent of the working directory; use "\-r" to specify a different revision.
232 .sp
233 .RS 4
234 .nf
235 To specify the type of archive to create, use "\-t".  Valid
236 types are:
237 .fi
238 .RE
239 .sp
240 .RS 4
241 .nf
242 "files" (default): a directory full of files
243 "tar": tar archive, uncompressed
244 "tbz2": tar archive, compressed using bzip2
245 "tgz": tar archive, compressed using gzip
246 "uzip": zip archive, uncompressed
247 "zip": zip archive, compressed using deflate
248 .fi
249 .RE
250 .sp
251 .RS 4
252 .nf
253 The exact name of the destination archive or directory is given
254 using a format string; see "hg help export" for details.
255 .fi
256 .RE
257 .sp
258 .RS 4
259 .nf
260 Each member added to an archive file has a directory prefix
261 prepended.  Use "\-p" to specify a format string for the prefix.
262 The default is the basename of the archive, with suffixes removed.
263 .fi
264 .RE
265 .sp
266 .RS 4
267 .nf
268 options:
269 \-\-no\-decode    do not pass files through decoders
270 \-p, \-\-prefix   directory prefix for files in archive
271 \-r, \-\-rev      revision to distribute
272 \-t, \-\-type     type of distribution to create
273 \-I, \-\-include  include names matching the given patterns
274 \-X, \-\-exclude  exclude names matching the given patterns
275 .fi
276 .RE
277 .RE
278 .PP
279 backout [OPTION]... [\-r] REV
280 .RS 4
281 Commit the backed out changes as a new changeset. The new changeset is a child of the backed out changeset.
282 .sp
283 .RS 4
284 .nf
285 If you back out a changeset other than the tip, a new head is
286 created.  This head will be the new tip and you should merge this
287 backout changeset with another head (current one by default).
288 .fi
289 .RE
290 .sp
291 .RS 4
292 .nf
293 The \-\-merge option remembers the parent of the working directory
294 before starting the backout, then merges the new head with that
295 changeset afterwards.  This saves you from doing the merge by
296 hand.  The result of this merge is not committed, as for a normal
297 merge.
298 .fi
299 .RE
300 .sp
301 .RS 4
302 .nf
303 See \'hg help dates\' for a list of formats valid for \-d/\-\-date.
304 .fi
305 .RE
306 .sp
307 .RS 4
308 .nf
309 options:
310 \-\-merge        merge with old dirstate parent after backout
311 \-\-parent       parent to choose when backing out merge
312 \-r, \-\-rev      revision to backout
313 \-I, \-\-include  include names matching the given patterns
314 \-X, \-\-exclude  exclude names matching the given patterns
315 \-m, \-\-message  use <text> as commit message
316 \-l, \-\-logfile  read commit message from <file>
317 \-d, \-\-date     record datecode as commit date
318 \-u, \-\-user     record user as committer
319 .fi
320 .RE
321 .RE
322 .PP
323 bisect [\-gbsr] [REV]
324 .RS 4
325 This command helps to find changesets which introduce problems. To use, mark the earliest changeset you know exhibits the problem as bad, then mark the latest changeset which is free from the problem as good. Bisect will update your working directory to a revision for testing. Once you have performed tests, mark the working directory as bad or good and bisect will either update to another candidate changeset or announce that it has found the bad revision.
326 .sp
327 .RS 4
328 .nf
329 options:
330 \-r, \-\-reset     reset bisect state
331 \-g, \-\-good      mark changeset good
332 \-b, \-\-bad       mark changeset bad
333 \-s, \-\-skip      skip testing changeset
334 \-U, \-\-noupdate  do not update to target
335 .fi
336 .RE
337 .RE
338 .PP
339 branch [\-f] [NAME]
340 .RS 4
341 With no argument, show the current branch name. With one argument, set the working directory branch name (the branch does not exist in the repository until the next commit).
342 .sp
343 .RS 4
344 .nf
345 Unless \-\-force is specified, branch will not let you set a
346 branch name that shadows an existing branch.
347 .fi
348 .RE
349 .sp
350 .RS 4
351 .nf
352 Use the command \'hg update\' to switch to an existing branch.
353 .fi
354 .RE
355 .sp
356 .RS 4
357 .nf
358 options:
359 \-f, \-\-force  set branch name even if it shadows an existing branch
360 .fi
361 .RE
362 .RE
363 .PP
364 branches [\-a]
365 .RS 4
366 List the repository\'s named branches, indicating which ones are inactive. If active is specified, only show active branches.
367 .sp
368 .RS 4
369 .nf
370 A branch is considered active if it contains repository heads.
371 .fi
372 .RE
373 .sp
374 .RS 4
375 .nf
376 Use the command \'hg update\' to switch to an existing branch.
377 .fi
378 .RE
379 .sp
380 .RS 4
381 .nf
382 options:
383 \-a, \-\-active  show only branches that have unmerged heads
384 .fi
385 .RE
386 .RE
387 .PP
388 bundle [\-f] [\-a] [\-r REV]... [\-\-base REV]... FILE [DEST]
389 .RS 4
390 Generate a compressed changegroup file collecting changesets not found in the other repository.
391 .sp
392 .RS 4
393 .nf
394 If no destination repository is specified the destination is
395 assumed to have all the nodes specified by one or more \-\-base
396 parameters.  To create a bundle containing all changesets, use
397 \-\-all (or \-\-base null).
398 .fi
399 .RE
400 .sp
401 .RS 4
402 .nf
403 The bundle file can then be transferred using conventional means and
404 applied to another repository with the unbundle or pull command.
405 This is useful when direct push and pull are not available or when
406 exporting an entire repository is undesirable.
407 .fi
408 .RE
409 .sp
410 .RS 4
411 .nf
412 Applying bundles preserves all changeset contents including
413 permissions, copy/rename information, and revision history.
414 .fi
415 .RE
416 .sp
417 .RS 4
418 .nf
419 options:
420 \-f, \-\-force  run even when remote repository is unrelated
421 \-r, \-\-rev    a changeset up to which you would like to bundle
422 \-\-base       a base changeset to specify instead of a destination
423 \-a, \-\-all    bundle all changesets in the repository
424 \-e, \-\-ssh    specify ssh command to use
425 \-\-remotecmd  specify hg command to run on the remote side
426 .fi
427 .RE
428 .RE
429 .PP
430 cat [OPTION]... FILE...
431 .RS 4
432 Print the specified files as they were at the given revision. If no revision is given, the parent of the working directory is used, or tip if no revision is checked out.
433 .sp
434 .RS 4
435 .nf
436 Output may be to a file, in which case the name of the file is
437 given using a format string.  The formatting rules are the same as
438 for the export command, with the following additions:
439 .fi
440 .RE
441 .sp
442 .RS 4
443 .nf
444 %s   basename of file being printed
445 %d   dirname of file being printed, or \'.\' if in repo root
446 %p   root\-relative path name of file being printed
447 .fi
448 .RE
449 .sp
450 .RS 4
451 .nf
452 options:
453 \-o, \-\-output   print output to file with formatted name
454 \-r, \-\-rev      print the given revision
455 \-\-decode       apply any matching decode filter
456 \-I, \-\-include  include names matching the given patterns
457 \-X, \-\-exclude  exclude names matching the given patterns
458 .fi
459 .RE
460 .RE
461 .PP
462 clone [OPTION]... SOURCE [DEST]
463 .RS 4
464 Create a copy of an existing repository in a new directory.
465 .sp
466 .RS 4
467 .nf
468 If no destination directory name is specified, it defaults to the
469 basename of the source.
470 .fi
471 .RE
472 .sp
473 .RS 4
474 .nf
475 The location of the source is added to the new repository\'s
476 .hg/hgrc file, as the default to be used for future pulls.
477 .fi
478 .RE
479 .sp
480 .RS 4
481 .nf
482 For efficiency, hardlinks are used for cloning whenever the source
483 and destination are on the same filesystem (note this applies only
484 to the repository data, not to the checked out files).  Some
485 filesystems, such as AFS, implement hardlinking incorrectly, but
486 do not report errors.  In these cases, use the \-\-pull option to
487 avoid hardlinking.
488 .fi
489 .RE
490 .sp
491 .RS 4
492 .nf
493 You can safely clone repositories and checked out files using full
494 hardlinks with
495 .fi
496 .RE
497 .sp
498 .RS 4
499 .nf
500 $ cp \-al REPO REPOCLONE
501 .fi
502 .RE
503 .sp
504 .RS 4
505 .nf
506 which is the fastest way to clone. However, the operation is not
507 atomic (making sure REPO is not modified during the operation is
508 up to you) and you have to make sure your editor breaks hardlinks
509 (Emacs and most Linux Kernel tools do so).
510 .fi
511 .RE
512 .sp
513 .RS 4
514 .nf
515 If you use the \-r option to clone up to a specific revision, no
516 subsequent revisions will be present in the cloned repository.
517 This option implies \-\-pull, even on local repositories.
518 .fi
519 .RE
520 .sp
521 .RS 4
522 .nf
523 If the \-U option is used, the new clone will contain only a repository
524 (.hg) and no working copy (the working copy parent is the null revision).
525 .fi
526 .RE
527 .sp
528 .RS 4
529 .nf
530 See pull for valid source format details.
531 .fi
532 .RE
533 .sp
534 .RS 4
535 .nf
536 It is possible to specify an ssh:// URL as the destination, but no
537 .hg/hgrc and working directory will be created on the remote side.
538 Look at the help text for the pull command for important details
539 about ssh:// URLs.
540 .fi
541 .RE
542 .sp
543 .RS 4
544 .nf
545 options:
546 \-U, \-\-noupdate  the clone will only contain a repository (no
547                 working copy)
548 \-r, \-\-rev       a changeset you would like to have after cloning
549 \-\-pull          use pull protocol to copy metadata
550 \-\-uncompressed  use uncompressed transfer (fast over LAN)
551 \-e, \-\-ssh       specify ssh command to use
552 \-\-remotecmd     specify hg command to run on the remote side
553 .fi
554 .RE
555 .RE
556 .PP
557 commit [OPTION]... [FILE]...
558 .RS 4
559 Commit changes to the given files into the repository.
560 .sp
561 .RS 4
562 .nf
563 If a list of files is omitted, all changes reported by "hg status"
564 will be committed.
565 .fi
566 .RE
567 .sp
568 .RS 4
569 .nf
570 If you are committing the result of a merge, do not provide any
571 file names or \-I/\-X filters.
572 .fi
573 .RE
574 .sp
575 .RS 4
576 .nf
577 If no commit message is specified, the configured editor is started to
578 enter a message.
579 .fi
580 .RE
581 .sp
582 .RS 4
583 .nf
584 See \'hg help dates\' for a list of formats valid for \-d/\-\-date.
585 .fi
586 .RE
587 .sp
588 .RS 4
589 .nf
590 options:
591 \-A, \-\-addremove  mark new/missing files as added/removed before
592                  committing
593 \-I, \-\-include    include names matching the given patterns
594 \-X, \-\-exclude    exclude names matching the given patterns
595 \-m, \-\-message    use <text> as commit message
596 \-l, \-\-logfile    read commit message from <file>
597 \-d, \-\-date       record datecode as commit date
598 \-u, \-\-user       record user as committer
599 .fi
600 .RE
601 .sp
602 .RS 4
603 .nf
604 aliases: ci
605 .fi
606 .RE
607 .RE
608 .PP
609 copy [OPTION]... [SOURCE]... DEST
610 .RS 4
611 Mark dest as having copies of source files. If dest is a directory, copies are put in that directory. If dest is a file, there can only be one source.
612 .sp
613 .RS 4
614 .nf
615 By default, this command copies the contents of files as they
616 stand in the working directory.  If invoked with \-\-after, the
617 operation is recorded, but no copying is performed.
618 .fi
619 .RE
620 .sp
621 .RS 4
622 .nf
623 This command takes effect in the next commit. To undo a copy
624 before that, see hg revert.
625 .fi
626 .RE
627 .sp
628 .RS 4
629 .nf
630 options:
631 \-A, \-\-after    record a copy that has already occurred
632 \-f, \-\-force    forcibly copy over an existing managed file
633 \-I, \-\-include  include names matching the given patterns
634 \-X, \-\-exclude  exclude names matching the given patterns
635 \-n, \-\-dry\-run  do not perform actions, just print output
636 .fi
637 .RE
638 .sp
639 .RS 4
640 .nf
641 aliases: cp
642 .fi
643 .RE
644 .RE
645 .PP
646 diff [OPTION]... [\-r REV1 [\-r REV2]] [FILE]...
647 .RS 4
648 Show differences between revisions for the specified files.
649 .sp
650 .RS 4
651 .nf
652 Differences between files are shown using the unified diff format.
653 .fi
654 .RE
655 .sp
656 .RS 4
657 .nf
658 NOTE: diff may generate unexpected results for merges, as it will
659 default to comparing against the working directory\'s first parent
660 changeset if no revisions are specified.
661 .fi
662 .RE
663 .sp
664 .RS 4
665 .nf
666 When two revision arguments are given, then changes are shown
667 between those revisions. If only one revision is specified then
668 that revision is compared to the working directory, and, when no
669 revisions are specified, the working directory files are compared
670 to its parent.
671 .fi
672 .RE
673 .sp
674 .RS 4
675 .nf
676 Without the \-a option, diff will avoid generating diffs of files
677 it detects as binary. With \-a, diff will generate a diff anyway,
678 probably with undesirable results.
679 .fi
680 .RE
681 .sp
682 .RS 4
683 .nf
684 options:
685 \-r, \-\-rev                  revision
686 \-a, \-\-text                 treat all files as text
687 \-p, \-\-show\-function        show which function each change is in
688 \-g, \-\-git                  use git extended diff format
689 \-\-nodates                  don\'t include dates in diff headers
690 \-w, \-\-ignore\-all\-space     ignore white space when comparing lines
691 \-b, \-\-ignore\-space\-change  ignore changes in the amount of white
692                            space
693 \-B, \-\-ignore\-blank\-lines   ignore changes whose lines are all
694                            blank
695 \-U, \-\-unified              number of lines of context to show
696 \-I, \-\-include              include names matching the given
697                            patterns
698 \-X, \-\-exclude              exclude names matching the given
699                            patterns
700 .fi
701 .RE
702 .RE
703 .PP
704 export [OPTION]... [\-o OUTFILESPEC] REV...
705 .RS 4
706 Print the changeset header and diffs for one or more revisions.
707 .sp
708 .RS 4
709 .nf
710 The information shown in the changeset header is: author,
711 changeset hash, parent(s) and commit comment.
712 .fi
713 .RE
714 .sp
715 .RS 4
716 .nf
717 NOTE: export may generate unexpected diff output for merge changesets,
718 as it will compare the merge changeset against its first parent only.
719 .fi
720 .RE
721 .sp
722 .RS 4
723 .nf
724 Output may be to a file, in which case the name of the file is
725 given using a format string.  The formatting rules are as follows:
726 .fi
727 .RE
728 .sp
729 .RS 4
730 .nf
731 %%   literal "%" character
732 %H   changeset hash (40 bytes of hexadecimal)
733 %N   number of patches being generated
734 %R   changeset revision number
735 %b   basename of the exporting repository
736 %h   short\-form changeset hash (12 bytes of hexadecimal)
737 %n   zero\-padded sequence number, starting at 1
738 %r   zero\-padded changeset revision number
739 .fi
740 .RE
741 .sp
742 .RS 4
743 .nf
744 Without the \-a option, export will avoid generating diffs of files
745 it detects as binary. With \-a, export will generate a diff anyway,
746 probably with undesirable results.
747 .fi
748 .RE
749 .sp
750 .RS 4
751 .nf
752 With the \-\-switch\-parent option, the diff will be against the second
753 parent. It can be useful to review a merge.
754 .fi
755 .RE
756 .sp
757 .RS 4
758 .nf
759 options:
760 \-o, \-\-output     print output to file with formatted name
761 \-a, \-\-text       treat all files as text
762 \-g, \-\-git        use git extended diff format
763 \-\-nodates        don\'t include dates in diff headers
764 \-\-switch\-parent  diff against the second parent
765 .fi
766 .RE
767 .RE
768 .PP
769 grep [OPTION]... PATTERN [FILE]...
770 .RS 4
771 Search revisions of files for a regular expression.
772 .sp
773 .RS 4
774 .nf
775 This command behaves differently than Unix grep.  It only accepts
776 Python/Perl regexps.  It searches repository history, not the
777 working directory.  It always prints the revision number in which
778 a match appears.
779 .fi
780 .RE
781 .sp
782 .RS 4
783 .nf
784 By default, grep only prints output for the first revision of a
785 file in which it finds a match.  To get it to print every revision
786 that contains a change in match status ("\-" for a match that
787 becomes a non\-match, or "+" for a non\-match that becomes a match),
788 use the \-\-all flag.
789 .fi
790 .RE
791 .sp
792 .RS 4
793 .nf
794 options:
795 \-0, \-\-print0              end fields with NUL
796 \-\-all                     print all revisions that match
797 \-f, \-\-follow              follow changeset history, or file
798                           history across copies and renames
799 \-i, \-\-ignore\-case         ignore case when matching
800 \-l, \-\-files\-with\-matches  print only filenames and revs that match
801 \-n, \-\-line\-number         print matching line numbers
802 \-r, \-\-rev                 search in given revision range
803 \-u, \-\-user                list the author (long with \-v)
804 \-d, \-\-date                list the date (short with \-q)
805 \-I, \-\-include             include names matching the given
806                           patterns
807 \-X, \-\-exclude             exclude names matching the given
808                           patterns
809 .fi
810 .RE
811 .RE
812 .PP
813 heads [\-r REV] [REV]...
814 .RS 4
815 With no arguments, show all repository head changesets.
816 .sp
817 .RS 4
818 .nf
819 If branch or revisions names are given this will show the heads of
820 the specified branches or the branches those revisions are tagged
821 with.
822 .fi
823 .RE
824 .sp
825 .RS 4
826 .nf
827 Repository "heads" are changesets that don\'t have child
828 changesets. They are where development generally takes place and
829 are the usual targets for update and merge operations.
830 .fi
831 .RE
832 .sp
833 .RS 4
834 .nf
835 Branch heads are changesets that have a given branch tag, but have
836 no child changesets with that tag.  They are usually where
837 development on the given branch takes place.
838 .fi
839 .RE
840 .sp
841 .RS 4
842 .nf
843 options:
844 \-r, \-\-rev   show only heads which are descendants of rev
845 \-\-style     display using template map file
846 \-\-template  display with template
847 .fi
848 .RE
849 .RE
850 .PP
851 help [COMMAND]
852 .RS 4
853 With no arguments, print a list of commands and short help.
854 .sp
855 .RS 4
856 .nf
857 Given a command name, print help for that command.
858 .fi
859 .RE
860 .sp
861 .RS 4
862 .nf
863 Given an extension name, print help for that extension, and the
864 commands it provides.
865 .fi
866 .RE
867 .RE
868 .PP
869 identify [\-nibt] [\-r REV] [SOURCE]
870 .RS 4
871 With no revision, print a summary of the current state of the repo.
872 .sp
873 .RS 4
874 .nf
875 With a path, do a lookup in another repository.
876 .fi
877 .RE
878 .sp
879 .RS 4
880 .nf
881 This summary identifies the repository state using one or two parent
882 hash identifiers, followed by a "+" if there are uncommitted changes
883 in the working directory, a list of tags for this revision and a branch
884 name for non\-default branches.
885 .fi
886 .RE
887 .sp
888 .RS 4
889 .nf
890 options:
891 \-r, \-\-rev     identify the specified rev
892 \-n, \-\-num     show local revision number
893 \-i, \-\-id      show global revision id
894 \-b, \-\-branch  show branch
895 \-t, \-\-tags    show tags
896 .fi
897 .RE
898 .sp
899 .RS 4
900 .nf
901 aliases: id
902 .fi
903 .RE
904 .RE
905 .PP
906 import [OPTION]... PATCH...
907 .RS 4
908 Import a list of patches and commit them individually.
909 .sp
910 .RS 4
911 .nf
912 If there are outstanding changes in the working directory, import
913 will abort unless given the \-f flag.
914 .fi
915 .RE
916 .sp
917 .RS 4
918 .nf
919 You can import a patch straight from a mail message.  Even patches
920 as attachments work (body part must be type text/plain or
921 text/x\-patch to be used).  From and Subject headers of email
922 message are used as default committer and commit message.  All
923 text/plain body parts before first diff are added to commit
924 message.
925 .fi
926 .RE
927 .sp
928 .RS 4
929 .nf
930 If the imported patch was generated by hg export, user and description
931 from patch override values from message headers and body.  Values
932 given on command line with \-m and \-u override these.
933 .fi
934 .RE
935 .sp
936 .RS 4
937 .nf
938 If \-\-exact is specified, import will set the working directory
939 to the parent of each patch before applying it, and will abort
940 if the resulting changeset has a different ID than the one
941 recorded in the patch. This may happen due to character set
942 problems or other deficiencies in the text patch format.
943 .fi
944 .RE
945 .sp
946 .RS 4
947 .nf
948 To read a patch from standard input, use patch name "\-".
949 See \'hg help dates\' for a list of formats valid for \-d/\-\-date.
950 .fi
951 .RE
952 .sp
953 .RS 4
954 .nf
955 options:
956 \-p, \-\-strip      directory strip option for patch. This has the
957                  same meaning as the corresponding patch option
958                  (default: 1)
959 \-b, \-\-base       base path
960 \-f, \-\-force      skip check for outstanding uncommitted changes
961 \-\-no\-commit      don\'t commit, just update the working directory
962 \-\-exact          apply patch to the nodes from which it was
963                  generated
964 \-\-import\-branch  Use any branch information in patch (implied by
965                  \-\-exact)
966 \-m, \-\-message    use <text> as commit message
967 \-l, \-\-logfile    read commit message from <file>
968 \-d, \-\-date       record datecode as commit date
969 \-u, \-\-user       record user as committer
970 .fi
971 .RE
972 .sp
973 .RS 4
974 .nf
975 aliases: patch
976 .fi
977 .RE
978 .RE
979 .PP
980 incoming [\-p] [\-n] [\-M] [\-f] [\-r REV]... [\-\-bundle FILENAME] [SOURCE]
981 .RS 4
982 Show new changesets found in the specified path/URL or the default pull location. These are the changesets that would be pulled if a pull was requested.
983 .sp
984 .RS 4
985 .nf
986 For remote repository, using \-\-bundle avoids downloading the changesets
987 twice if the incoming is followed by a pull.
988 .fi
989 .RE
990 .sp
991 .RS 4
992 .nf
993 See pull for valid source format details.
994 .fi
995 .RE
996 .sp
997 .RS 4
998 .nf
999 options:
1000 \-f, \-\-force         run even when remote repository is unrelated
1001 \-n, \-\-newest\-first  show newest record first
1002 \-\-bundle            file to store the bundles into
1003 \-r, \-\-rev           a specific revision up to which you would like
1004                     to pull
1005 \-p, \-\-patch         show patch
1006 \-l, \-\-limit         limit number of changes displayed
1007 \-M, \-\-no\-merges     do not show merges
1008 \-\-style             display using template map file
1009 \-\-template          display with template
1010 \-e, \-\-ssh           specify ssh command to use
1011 \-\-remotecmd         specify hg command to run on the remote side
1012 .fi
1013 .RE
1014 .sp
1015 .RS 4
1016 .nf
1017 aliases: in
1018 .fi
1019 .RE
1020 .RE
1021 .PP
1022 init [\-e CMD] [\-\-remotecmd CMD] [DEST]
1023 .RS 4
1024 Initialize a new repository in the given directory. If the given directory does not exist, it is created.
1025 .sp
1026 .RS 4
1027 .nf
1028 If no directory is given, the current directory is used.
1029 .fi
1030 .RE
1031 .sp
1032 .RS 4
1033 .nf
1034 It is possible to specify an ssh:// URL as the destination.
1035 Look at the help text for the pull command for important details
1036 about ssh:// URLs.
1037 .fi
1038 .RE
1039 .sp
1040 .RS 4
1041 .nf
1042 options:
1043 \-e, \-\-ssh    specify ssh command to use
1044 \-\-remotecmd  specify hg command to run on the remote side
1045 .fi
1046 .RE
1047 .RE
1048 .PP
1049 locate [OPTION]... [PATTERN]...
1050 .RS 4
1051 Print all files under Mercurial control whose names match the given patterns.
1052 .sp
1053 .RS 4
1054 .nf
1055 This command searches the entire repository by default.  To search
1056 just the current directory and its subdirectories, use
1057 "\-\-include .".
1058 .fi
1059 .RE
1060 .sp
1061 .RS 4
1062 .nf
1063 If no patterns are given to match, this command prints all file
1064 names.
1065 .fi
1066 .RE
1067 .sp
1068 .RS 4
1069 .nf
1070 If you want to feed the output of this command into the "xargs"
1071 command, use the "\-0" option to both this command and "xargs".
1072 This will avoid the problem of "xargs" treating single filenames
1073 that contain white space as multiple filenames.
1074 .fi
1075 .RE
1076 .sp
1077 .RS 4
1078 .nf
1079 options:
1080 \-r, \-\-rev       search the repository as it stood at rev
1081 \-0, \-\-print0    end filenames with NUL, for use with xargs
1082 \-f, \-\-fullpath  print complete paths from the filesystem root
1083 \-I, \-\-include   include names matching the given patterns
1084 \-X, \-\-exclude   exclude names matching the given patterns
1085 .fi
1086 .RE
1087 .RE
1088 .PP
1089 log [OPTION]... [FILE]
1090 .RS 4
1091 Print the revision history of the specified files or the entire project.
1092 .sp
1093 .RS 4
1094 .nf
1095 File history is shown without following rename or copy history of
1096 files.  Use \-f/\-\-follow with a file name to follow history across
1097 renames and copies. \-\-follow without a file name will only show
1098 ancestors or descendants of the starting revision. \-\-follow\-first
1099 only follows the first parent of merge revisions.
1100 .fi
1101 .RE
1102 .sp
1103 .RS 4
1104 .nf
1105 If no revision range is specified, the default is tip:0 unless
1106 \-\-follow is set, in which case the working directory parent is
1107 used as the starting revision.
1108 .fi
1109 .RE
1110 .sp
1111 .RS 4
1112 .nf
1113 See \'hg help dates\' for a list of formats valid for \-d/\-\-date.
1114 .fi
1115 .RE
1116 .sp
1117 .RS 4
1118 .nf
1119 By default this command outputs: changeset id and hash, tags,
1120 non\-trivial parents, user, date and time, and a summary for each
1121 commit. When the \-v/\-\-verbose switch is used, the list of changed
1122 files and full commit message is shown.
1123 .fi
1124 .RE
1125 .sp
1126 .RS 4
1127 .nf
1128 NOTE: log \-p may generate unexpected diff output for merge
1129 changesets, as it will compare the merge changeset against its
1130 first parent only. Also, the files: list will only reflect files
1131 that are different from BOTH parents.
1132 .fi
1133 .RE
1134 .sp
1135 .RS 4
1136 .nf
1137 options:
1138 \-f, \-\-follow       follow changeset history, or file history
1139                    across copies and renames
1140 \-\-follow\-first     only follow the first parent of merge
1141                    changesets
1142 \-d, \-\-date         show revs matching date spec
1143 \-C, \-\-copies       show copied files
1144 \-k, \-\-keyword      do case\-insensitive search for a keyword
1145 \-r, \-\-rev          show the specified revision or range
1146 \-\-removed          include revs where files were removed
1147 \-m, \-\-only\-merges  show only merges
1148 \-b, \-\-only\-branch  show only changesets within the given named
1149                    branch
1150 \-P, \-\-prune        do not display revision or any of its ancestors
1151 \-p, \-\-patch        show patch
1152 \-l, \-\-limit        limit number of changes displayed
1153 \-M, \-\-no\-merges    do not show merges
1154 \-\-style            display using template map file
1155 \-\-template         display with template
1156 \-I, \-\-include      include names matching the given patterns
1157 \-X, \-\-exclude      exclude names matching the given patterns
1158 .fi
1159 .RE
1160 .sp
1161 .RS 4
1162 .nf
1163 aliases: history
1164 .fi
1165 .RE
1166 .RE
1167 .PP
1168 manifest [\-r REV]
1169 .RS 4
1170 Print a list of version controlled files for the given revision. If no revision is given, the parent of the working directory is used, or tip if no revision is checked out.
1171 .sp
1172 .RS 4
1173 .nf
1174 The manifest is the list of files being version controlled. If no revision
1175 is given then the first parent of the working directory is used.
1176 .fi
1177 .RE
1178 .sp
1179 .RS 4
1180 .nf
1181 With \-v flag, print file permissions, symlink and executable bits. With
1182 \-\-debug flag, print file revision hashes.
1183 .fi
1184 .RE
1185 .sp
1186 .RS 4
1187 .nf
1188 options:
1189 \-r, \-\-rev  revision to display
1190 .fi
1191 .RE
1192 .RE
1193 .PP
1194 merge [\-f] [[\-r] REV]
1195 .RS 4
1196 Merge the contents of the current working directory and the requested revision. Files that changed between either parent are marked as changed for the next commit and a commit must be performed before any further updates are allowed.
1197 .sp
1198 .RS 4
1199 .nf
1200 If no revision is specified, the working directory\'s parent is a
1201 head revision, and the repository contains exactly one other head,
1202 the other head is merged with by default.  Otherwise, an explicit
1203 revision to merge with must be provided.
1204 .fi
1205 .RE
1206 .sp
1207 .RS 4
1208 .nf
1209 options:
1210 \-f, \-\-force  force a merge with outstanding changes
1211 \-r, \-\-rev    revision to merge
1212 .fi
1213 .RE
1214 .RE
1215 .PP
1216 outgoing [\-M] [\-p] [\-n] [\-f] [\-r REV]... [DEST]
1217 .RS 4
1218 Show changesets not found in the specified destination repository or the default push location. These are the changesets that would be pushed if a push was requested.
1219 .sp
1220 .RS 4
1221 .nf
1222 See pull for valid destination format details.
1223 .fi
1224 .RE
1225 .sp
1226 .RS 4
1227 .nf
1228 options:
1229 \-f, \-\-force         run even when remote repository is unrelated
1230 \-r, \-\-rev           a specific revision up to which you would like
1231                     to push
1232 \-n, \-\-newest\-first  show newest record first
1233 \-p, \-\-patch         show patch
1234 \-l, \-\-limit         limit number of changes displayed
1235 \-M, \-\-no\-merges     do not show merges
1236 \-\-style             display using template map file
1237 \-\-template          display with template
1238 \-e, \-\-ssh           specify ssh command to use
1239 \-\-remotecmd         specify hg command to run on the remote side
1240 .fi
1241 .RE
1242 .sp
1243 .RS 4
1244 .nf
1245 aliases: out
1246 .fi
1247 .RE
1248 .RE
1249 .PP
1250 parents [\-r REV] [FILE]
1251 .RS 4
1252 Print the working directory\'s parent revisions. If a revision is given via \-\-rev, the parent of that revision will be printed. If a file argument is given, revision in which the file was last changed (before the working directory revision or the argument to \-\-rev if given) is printed.
1253 .sp
1254 .RS 4
1255 .nf
1256 options:
1257 \-r, \-\-rev   show parents from the specified rev
1258 \-\-style     display using template map file
1259 \-\-template  display with template
1260 .fi
1261 .RE
1262 .RE
1263 .PP
1264 paths [NAME]
1265 .RS 4
1266 Show definition of symbolic path name NAME. If no name is given, show definition of available names.
1267 .sp
1268 .RS 4
1269 .nf
1270 Path names are defined in the [paths] section of /etc/mercurial/hgrc
1271 and $HOME/.hgrc.  If run inside a repository, .hg/hgrc is used, too.
1272 .fi
1273 .RE
1274 .RE
1275 .PP
1276 pull [\-u] [\-f] [\-r REV]... [\-e CMD] [\-\-remotecmd CMD] [SOURCE]
1277 .RS 4
1278 Pull changes from a remote repository to a local one.
1279 .sp
1280 .RS 4
1281 .nf
1282 This finds all changes from the repository at the specified path
1283 or URL and adds them to the local repository. By default, this
1284 does not update the copy of the project in the working directory.
1285 .fi
1286 .RE
1287 .sp
1288 .RS 4
1289 .nf
1290 Valid URLs are of the form:
1291 .fi
1292 .RE
1293 .sp
1294 .RS 4
1295 .nf
1296 local/filesystem/path (or file://local/filesystem/path)
1297 http://[user@]host[:port]/[path]
1298 https://[user@]host[:port]/[path]
1299 ssh://[user@]host[:port]/[path]
1300 static\-http://host[:port]/[path]
1301 .fi
1302 .RE
1303 .sp
1304 .RS 4
1305 .nf
1306 Paths in the local filesystem can either point to Mercurial
1307 repositories or to bundle files (as created by \'hg bundle\' or
1308 \'hg incoming \-\-bundle\'). The static\-http:// protocol, albeit slow,
1309 allows access to a Mercurial repository where you simply use a web
1310 server to publish the .hg directory as static content.
1311 .fi
1312 .RE
1313 .sp
1314 .RS 4
1315 .nf
1316 An optional identifier after # indicates a particular branch, tag,
1317 or changeset to pull.
1318 .fi
1319 .RE
1320 .sp
1321 .RS 4
1322 .nf
1323 Some notes about using SSH with Mercurial:
1324 \- SSH requires an accessible shell account on the destination machine
1325   and a copy of hg in the remote path or specified with as remotecmd.
1326 \- path is relative to the remote user\'s home directory by default.
1327   Use an extra slash at the start of a path to specify an absolute path:
1328     ssh://example.com//tmp/repository
1329 \- Mercurial doesn\'t use its own compression via SSH; the right thing
1330   to do is to configure it in your ~/.ssh/config, e.g.:
1331     Host *.mylocalnetwork.example.com
1332       Compression no
1333     Host *
1334       Compression yes
1335   Alternatively specify "ssh \-C" as your ssh command in your hgrc or
1336   with the \-\-ssh command line option.
1337 .fi
1338 .RE
1339 .sp
1340 .RS 4
1341 .nf
1342 options:
1343 \-u, \-\-update  update to new tip if changesets were pulled
1344 \-f, \-\-force   run even when remote repository is unrelated
1345 \-r, \-\-rev     a specific revision up to which you would like to
1346               pull
1347 \-e, \-\-ssh     specify ssh command to use
1348 \-\-remotecmd   specify hg command to run on the remote side
1349 .fi
1350 .RE
1351 .RE
1352 .PP
1353 push [\-f] [\-r REV]... [\-e CMD] [\-\-remotecmd CMD] [DEST]
1354 .RS 4
1355 Push changes from the local repository to the given destination.
1356 .sp
1357 .RS 4
1358 .nf
1359 This is the symmetrical operation for pull. It helps to move
1360 changes from the current repository to a different one. If the
1361 destination is local this is identical to a pull in that directory
1362 from the current one.
1363 .fi
1364 .RE
1365 .sp
1366 .RS 4
1367 .nf
1368 By default, push will refuse to run if it detects the result would
1369 increase the number of remote heads. This generally indicates
1370 the client has forgotten to pull and merge before pushing.
1371 .fi
1372 .RE
1373 .sp
1374 .RS 4
1375 .nf
1376 Valid URLs are of the form:
1377 .fi
1378 .RE
1379 .sp
1380 .RS 4
1381 .nf
1382 local/filesystem/path (or file://local/filesystem/path)
1383 ssh://[user@]host[:port]/[path]
1384 http://[user@]host[:port]/[path]
1385 https://[user@]host[:port]/[path]
1386 .fi
1387 .RE
1388 .sp
1389 .RS 4
1390 .nf
1391 An optional identifier after # indicates a particular branch, tag,
1392 or changeset to push. If \-r is used, the named changeset and all its
1393 ancestors will be pushed to the remote repository.
1394 .fi
1395 .RE
1396 .sp
1397 .RS 4
1398 .nf
1399 Look at the help text for the pull command for important details
1400 about ssh:// URLs.
1401 .fi
1402 .RE
1403 .sp
1404 .RS 4
1405 .nf
1406 Pushing to http:// and https:// URLs is only possible, if this
1407 feature is explicitly enabled on the remote Mercurial server.
1408 .fi
1409 .RE
1410 .sp
1411 .RS 4
1412 .nf
1413 options:
1414 \-f, \-\-force  force push
1415 \-r, \-\-rev    a specific revision up to which you would like to
1416              push
1417 \-e, \-\-ssh    specify ssh command to use
1418 \-\-remotecmd  specify hg command to run on the remote side
1419 .fi
1420 .RE
1421 .RE
1422 .PP
1423 recover
1424 .RS 4
1425 Recover from an interrupted commit or pull.
1426 .sp
1427 .RS 4
1428 .nf
1429 This command tries to fix the repository status after an interrupted
1430 operation. It should only be necessary when Mercurial suggests it.
1431 .fi
1432 .RE
1433 .RE
1434 .PP
1435 remove [OPTION]... FILE...
1436 .RS 4
1437 Schedule the indicated files for removal from the repository.
1438 .sp
1439 .RS 4
1440 .nf
1441 This only removes files from the current branch, not from the entire
1442 project history. \-A can be used to remove only files that have already
1443 been deleted, \-f can be used to force deletion, and \-Af can be used
1444 to remove files from the next revision without deleting them.
1445 .fi
1446 .RE
1447 .sp
1448 .RS 4
1449 .nf
1450 The following table details the behavior of remove for different file
1451 states (columns) and option combinations (rows). The file states are
1452 Added, Clean, Modified and Missing (as reported by hg status). The
1453 actions are Warn, Remove (from branch) and Delete (from disk).
1454 .fi
1455 .RE
1456 .sp
1457 .RS 4
1458 .nf
1459        A  C  M  !
1460 none   W  RD W  R
1461 \-f     R  RD RD R
1462 \-A     W  W  W  R
1463 \-Af    R  R  R  R
1464 .fi
1465 .RE
1466 .sp
1467 .RS 4
1468 .nf
1469 This command schedules the files to be removed at the next commit.
1470 To undo a remove before that, see hg revert.
1471 .fi
1472 .RE
1473 .sp
1474 .RS 4
1475 .nf
1476 options:
1477 \-A, \-\-after    record delete for missing files
1478 \-f, \-\-force    remove (and delete) file even if added or modified
1479 \-I, \-\-include  include names matching the given patterns
1480 \-X, \-\-exclude  exclude names matching the given patterns
1481 .fi
1482 .RE
1483 .sp
1484 .RS 4
1485 .nf
1486 aliases: rm
1487 .fi
1488 .RE
1489 .RE
1490 .PP
1491 rename [OPTION]... SOURCE... DEST
1492 .RS 4
1493 Mark dest as copies of sources; mark sources for deletion. If dest is a directory, copies are put in that directory. If dest is a file, there can only be one source.
1494 .sp
1495 .RS 4
1496 .nf
1497 By default, this command copies the contents of files as they
1498 stand in the working directory.  If invoked with \-\-after, the
1499 operation is recorded, but no copying is performed.
1500 .fi
1501 .RE
1502 .sp
1503 .RS 4
1504 .nf
1505 This command takes effect in the next commit. To undo a rename
1506 before that, see hg revert.
1507 .fi
1508 .RE
1509 .sp
1510 .RS 4
1511 .nf
1512 options:
1513 \-A, \-\-after    record a rename that has already occurred
1514 \-f, \-\-force    forcibly copy over an existing managed file
1515 \-I, \-\-include  include names matching the given patterns
1516 \-X, \-\-exclude  exclude names matching the given patterns
1517 \-n, \-\-dry\-run  do not perform actions, just print output
1518 .fi
1519 .RE
1520 .sp
1521 .RS 4
1522 .nf
1523 aliases: mv
1524 .fi
1525 .RE
1526 .RE
1527 .PP
1528 revert [OPTION]... [\-r REV] [NAME]...
1529 .RS 4
1530 (use update \-r to check out earlier revisions, revert does not change the working dir parents)
1531 .sp
1532 .RS 4
1533 .nf
1534 With no revision specified, revert the named files or directories
1535 to the contents they had in the parent of the working directory.
1536 This restores the contents of the affected files to an unmodified
1537 state and unschedules adds, removes, copies, and renames. If the
1538 working directory has two parents, you must explicitly specify the
1539 revision to revert to.
1540 .fi
1541 .RE
1542 .sp
1543 .RS 4
1544 .nf
1545 Using the \-r option, revert the given files or directories to their
1546 contents as of a specific revision. This can be helpful to "roll
1547 back" some or all of an earlier change.
1548 See \'hg help dates\' for a list of formats valid for \-d/\-\-date.
1549 .fi
1550 .RE
1551 .sp
1552 .RS 4
1553 .nf
1554 Revert modifies the working directory.  It does not commit any
1555 changes, or change the parent of the working directory.  If you
1556 revert to a revision other than the parent of the working
1557 directory, the reverted files will thus appear modified
1558 afterwards.
1559 .fi
1560 .RE
1561 .sp
1562 .RS 4
1563 .nf
1564 If a file has been deleted, it is restored.  If the executable
1565 mode of a file was changed, it is reset.
1566 .fi
1567 .RE
1568 .sp
1569 .RS 4
1570 .nf
1571 If names are given, all files matching the names are reverted.
1572 If no arguments are given, no files are reverted.
1573 .fi
1574 .RE
1575 .sp
1576 .RS 4
1577 .nf
1578 Modified files are saved with a .orig suffix before reverting.
1579 To disable these backups, use \-\-no\-backup.
1580 .fi
1581 .RE
1582 .sp
1583 .RS 4
1584 .nf
1585 options:
1586 \-a, \-\-all      revert all changes when no arguments given
1587 \-d, \-\-date     tipmost revision matching date
1588 \-r, \-\-rev      revision to revert to
1589 \-\-no\-backup    do not save backup copies of files
1590 \-I, \-\-include  include names matching the given patterns
1591 \-X, \-\-exclude  exclude names matching the given patterns
1592 \-n, \-\-dry\-run  do not perform actions, just print output
1593 .fi
1594 .RE
1595 .RE
1596 .PP
1597 rollback
1598 .RS 4
1599 This command should be used with care. There is only one level of rollback, and there is no way to undo a rollback. It will also restore the dirstate at the time of the last transaction, losing any dirstate changes since that time.
1600 .sp
1601 .RS 4
1602 .nf
1603 Transactions are used to encapsulate the effects of all commands
1604 that create new changesets or propagate existing changesets into a
1605 repository. For example, the following commands are transactional,
1606 and their effects can be rolled back:
1607 .fi
1608 .RE
1609 .sp
1610 .RS 4
1611 .nf
1612 commit
1613 import
1614 pull
1615 push (with this repository as destination)
1616 unbundle
1617 .fi
1618 .RE
1619 .sp
1620 .RS 4
1621 .nf
1622 This command is not intended for use on public repositories. Once
1623 changes are visible for pull by other users, rolling a transaction
1624 back locally is ineffective (someone else may already have pulled
1625 the changes). Furthermore, a race is possible with readers of the
1626 repository; for example an in\-progress pull from the repository
1627 may fail if a rollback is performed.
1628 .fi
1629 .RE
1630 .RE
1631 .PP
1632 root
1633 .RS 4
1634 Print the root directory of the current repository.
1635 .RE
1636 .PP
1637 serve [OPTION]...
1638 .RS 4
1639 Start a local HTTP repository browser and pull server.
1640 .sp
1641 .RS 4
1642 .nf
1643 By default, the server logs accesses to stdout and errors to
1644 stderr.  Use the "\-A" and "\-E" options to log to files.
1645 .fi
1646 .RE
1647 .sp
1648 .RS 4
1649 .nf
1650 options:
1651 \-A, \-\-accesslog   name of access log file to write to
1652 \-d, \-\-daemon      run server in background
1653 \-\-daemon\-pipefds  used internally by daemon mode
1654 \-E, \-\-errorlog    name of error log file to write to
1655 \-p, \-\-port        port to listen on (default: 8000)
1656 \-a, \-\-address     address to listen on (default: all interfaces)
1657 \-\-prefix          prefix path to serve from (default: server root)
1658 \-n, \-\-name        name to show in web pages (default: working dir)
1659 \-\-webdir\-conf     name of the webdir config file (serve more than
1660                   one repo)
1661 \-\-pid\-file        name of file to write process ID to
1662 \-\-stdio           for remote clients
1663 \-t, \-\-templates   web templates to use
1664 \-\-style           template style to use
1665 \-6, \-\-ipv6        use IPv6 in addition to IPv4
1666 \-\-certificate     SSL certificate file
1667 .fi
1668 .RE
1669 .RE
1670 .PP
1671 showconfig [\-u] [NAME]...
1672 .RS 4
1673 With no args, print names and values of all config items.
1674 .sp
1675 .RS 4
1676 .nf
1677 With one arg of the form section.name, print just the value of
1678 that config item.
1679 .fi
1680 .RE
1681 .sp
1682 .RS 4
1683 .nf
1684 With multiple args, print names and values of all config items
1685 with matching section names.
1686 .fi
1687 .RE
1688 .sp
1689 .RS 4
1690 .nf
1691 options:
1692 \-u, \-\-untrusted  show untrusted configuration options
1693 .fi
1694 .RE
1695 .sp
1696 .RS 4
1697 .nf
1698 aliases: debugconfig
1699 .fi
1700 .RE
1701 .RE
1702 .PP
1703 status [OPTION]... [FILE]...
1704 .RS 4
1705 Show status of files in the repository. If names are given, only files that match are shown. Files that are clean or ignored or source of a copy/move operation, are not listed unless \-c (clean), \-i (ignored), \-C (copies) or \-A is given. Unless options described with "show only ..." are given, the options \-mardu are used.
1706 .sp
1707 .RS 4
1708 .nf
1709 Option \-q/\-\-quiet hides untracked (unknown and ignored) files
1710 unless explicitly requested with \-u/\-\-unknown or \-i/\-ignored.
1711 .fi
1712 .RE
1713 .sp
1714 .RS 4
1715 .nf
1716 NOTE: status may appear to disagree with diff if permissions have
1717 changed or a merge has occurred. The standard diff format does not
1718 report permission changes and diff only reports changes relative
1719 to one merge parent.
1720 .fi
1721 .RE
1722 .sp
1723 .RS 4
1724 .nf
1725 If one revision is given, it is used as the base revision.
1726 If two revisions are given, the difference between them is shown.
1727 .fi
1728 .RE
1729 .sp
1730 .RS 4
1731 .nf
1732 The codes used to show the status of files are:
1733 M = modified
1734 A = added
1735 R = removed
1736 C = clean
1737 ! = deleted, but still tracked
1738 ? = not tracked
1739 I = ignored
1740   = the previous added file was copied from here
1741 .fi
1742 .RE
1743 .sp
1744 .RS 4
1745 .nf
1746 options:
1747 \-A, \-\-all        show status of all files
1748 \-m, \-\-modified   show only modified files
1749 \-a, \-\-added      show only added files
1750 \-r, \-\-removed    show only removed files
1751 \-d, \-\-deleted    show only deleted (but tracked) files
1752 \-c, \-\-clean      show only files without changes
1753 \-u, \-\-unknown    show only unknown (not tracked) files
1754 \-i, \-\-ignored    show only ignored files
1755 \-n, \-\-no\-status  hide status prefix
1756 \-C, \-\-copies     show source of copied files
1757 \-0, \-\-print0     end filenames with NUL, for use with xargs
1758 \-\-rev            show difference from revision
1759 \-I, \-\-include    include names matching the given patterns
1760 \-X, \-\-exclude    exclude names matching the given patterns
1761 .fi
1762 .RE
1763 .sp
1764 .RS 4
1765 .nf
1766 aliases: st
1767 .fi
1768 .RE
1769 .RE
1770 .PP
1771 tag [\-l] [\-m TEXT] [\-d DATE] [\-u USER] [\-r REV] NAME...
1772 .RS 4
1773 Name a particular revision using <name>.
1774 .sp
1775 .RS 4
1776 .nf
1777 Tags are used to name particular revisions of the repository and are
1778 very useful to compare different revisions, to go back to significant
1779 earlier versions or to mark branch points as releases, etc.
1780 .fi
1781 .RE
1782 .sp
1783 .RS 4
1784 .nf
1785 If no revision is given, the parent of the working directory is used,
1786 or tip if no revision is checked out.
1787 .fi
1788 .RE
1789 .sp
1790 .RS 4
1791 .nf
1792 To facilitate version control, distribution, and merging of tags,
1793 they are stored as a file named ".hgtags" which is managed
1794 similarly to other project files and can be hand\-edited if
1795 necessary.  The file \'.hg/localtags\' is used for local tags (not
1796 shared among repositories).
1797 .fi
1798 .RE
1799 .sp
1800 .RS 4
1801 .nf
1802 See \'hg help dates\' for a list of formats valid for \-d/\-\-date.
1803 .fi
1804 .RE
1805 .sp
1806 .RS 4
1807 .nf
1808 options:
1809 \-f, \-\-force    replace existing tag
1810 \-l, \-\-local    make the tag local
1811 \-r, \-\-rev      revision to tag
1812 \-\-remove       remove a tag
1813 \-m, \-\-message  use <text> as commit message
1814 \-d, \-\-date     record datecode as commit date
1815 \-u, \-\-user     record user as committer
1816 .fi
1817 .RE
1818 .RE
1819 .PP
1820 tags
1821 .RS 4
1822 List the repository tags.
1823 .sp
1824 .RS 4
1825 .nf
1826 This lists both regular and local tags. When the \-v/\-\-verbose switch
1827 is used, a third column "local" is printed for local tags.
1828 .fi
1829 .RE
1830 .RE
1831 .PP
1832 tip [\-p]
1833 .RS 4
1834 The tip revision (usually just called the tip) is the most recently added changeset in the repository, the most recently changed head.
1835 .sp
1836 .RS 4
1837 .nf
1838 If you have just made a commit, that commit will be the tip. If
1839 you have just pulled changes from another repository, the tip of
1840 that repository becomes the current tip. The "tip" tag is special
1841 and cannot be renamed or assigned to a different changeset.
1842 .fi
1843 .RE
1844 .sp
1845 .RS 4
1846 .nf
1847 options:
1848 \-p, \-\-patch  show patch
1849 \-\-style      display using template map file
1850 \-\-template   display with template
1851 .fi
1852 .RE
1853 .RE
1854 .PP
1855 unbundle [\-u] FILE...
1856 .RS 4
1857 Apply one or more compressed changegroup files generated by the bundle command.
1858 .sp
1859 .RS 4
1860 .nf
1861 options:
1862 \-u, \-\-update  update to new tip if changesets were unbundled
1863 .fi
1864 .RE
1865 .RE
1866 .PP
1867 update [\-C] [\-d DATE] [[\-r] REV]
1868 .RS 4
1869 Update the working directory to the specified revision, or the tip of the current branch if none is specified.
1870 .sp
1871 .RS 4
1872 .nf
1873 If the requested revision is a descendant of the working
1874 directory, any outstanding changes in the working directory will
1875 be merged into the result. If it is not directly descended but is
1876 on the same named branch, update aborts with a suggestion to use
1877 merge or update \-C instead.
1878 .fi
1879 .RE
1880 .sp
1881 .RS 4
1882 .nf
1883 If the requested revision is on a different named branch and the
1884 working directory is clean, update quietly switches branches.
1885 .fi
1886 .RE
1887 .sp
1888 .RS 4
1889 .nf
1890 If you want to update just one file to an older revision, use revert.
1891 .fi
1892 .RE
1893 .sp
1894 .RS 4
1895 .nf
1896 See \'hg help dates\' for a list of formats valid for \-\-date.
1897 .fi
1898 .RE
1899 .sp
1900 .RS 4
1901 .nf
1902 options:
1903 \-C, \-\-clean  overwrite locally modified files
1904 \-d, \-\-date   tipmost revision matching date
1905 \-r, \-\-rev    revision
1906 .fi
1907 .RE
1908 .sp
1909 .RS 4
1910 .nf
1911 aliases: up checkout co
1912 .fi
1913 .RE
1914 .RE
1915 .PP
1916 verify
1917 .RS 4
1918 Verify the integrity of the current repository.
1919 .sp
1920 .RS 4
1921 .nf
1922 This will perform an extensive check of the repository\'s
1923 integrity, validating the hashes and checksums of each entry in
1924 the changelog, manifest, and tracked files, as well as the
1925 integrity of their crosslinks and indices.
1926 .fi
1927 .RE
1928 .RE
1929 .PP
1930 version
1931 .RS 4
1932 output version and copyright information
1933 .RE
1934 .SH "DATE FORMATS"
1935 .sp
1936 .RS 4
1937 .nf
1938 Some commands allow the user to specify a date:
1939 backout, commit, import, tag: Specify the commit date.
1940 log, revert, update: Select revision(s) by date.
1941 .fi
1942 .RE
1943 .sp
1944 .RS 4
1945 .nf
1946 Many date formats are valid. Here are some examples:
1947 .fi
1948 .RE
1949 .sp
1950 .RS 4
1951 .nf
1952 "Wed Dec 6 13:18:29 2006" (local timezone assumed)
1953 "Dec 6 13:18 \-0600" (year assumed, time offset provided)
1954 "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
1955 "Dec 6" (midnight)
1956 "13:18" (today assumed)
1957 "3:39" (3:39AM assumed)
1958 "3:39pm" (15:39)
1959 "2006\-12\-6 13:18:29" (ISO 8601 format)
1960 "2006\-12\-6 13:18"
1961 "2006\-12\-6"
1962 "12\-6"
1963 "12/6"
1964 "12/6/6" (Dec 6 2006)
1965 .fi
1966 .RE
1967 .sp
1968 .RS 4
1969 .nf
1970 Lastly, there is Mercurial\'s internal format:
1971 .fi
1972 .RE
1973 .sp
1974 .RS 4
1975 .nf
1976 "1165432709 0" (Wed Dec 6 13:18:29 2006 UTC)
1977 .fi
1978 .RE
1979 .sp
1980 .RS 4
1981 .nf
1982 This is the internal representation format for dates. unixtime is
1983 the number of seconds since the epoch (1970\-01\-01 00:00 UTC). offset
1984 is the offset of the local timezone, in seconds west of UTC (negative
1985 if the timezone is east of UTC).
1986 .fi
1987 .RE
1988 .sp
1989 .RS 4
1990 .nf
1991 The log command also accepts date ranges:
1992 .fi
1993 .RE
1994 .sp
1995 .RS 4
1996 .nf
1997 "<{date}" \- on or before a given date
1998 ">{date}" \- on or after a given date
1999 "{date} to {date}" \- a date range, inclusive
2000 "\-{days}" \- within a given number of days of today
2001 .fi
2002 .RE
2003 .SH "FILE PATTERNS"
2004 .sp
2005 .RS 4
2006 .nf
2007 Mercurial accepts several notations for identifying one or more
2008 files at a time.
2009 .fi
2010 .RE
2011 .sp
2012 .RS 4
2013 .nf
2014 By default, Mercurial treats filenames as shell\-style extended
2015 glob patterns.
2016 .fi
2017 .RE
2018 .sp
2019 .RS 4
2020 .nf
2021 Alternate pattern notations must be specified explicitly.
2022 .fi
2023 .RE
2024 .sp
2025 .RS 4
2026 .nf
2027 To use a plain path name without any pattern matching, start a
2028 name with "path:".  These path names must match completely, from
2029 the root of the current repository.
2030 .fi
2031 .RE
2032 .sp
2033 .RS 4
2034 .nf
2035 To use an extended glob, start a name with "glob:".  Globs are
2036 rooted at the current directory; a glob such as "*.c" will match
2037 files ending in ".c" in the current directory only.
2038 .fi
2039 .RE
2040 .sp
2041 .RS 4
2042 .nf
2043 The supported glob syntax extensions are "**" to match any string
2044 across path separators, and "{a,b}" to mean "a or b".
2045 .fi
2046 .RE
2047 .sp
2048 .RS 4
2049 .nf
2050 To use a Perl/Python regular expression, start a name with "re:".
2051 Regexp pattern matching is anchored at the root of the repository.
2052 .fi
2053 .RE
2054 .sp
2055 .RS 4
2056 .nf
2057 Plain examples:
2058 .fi
2059 .RE
2060 .sp
2061 .RS 4
2062 .nf
2063 path:foo/bar   a name bar in a directory named foo in the root of
2064                the repository
2065 path:path:name a file or directory named "path:name"
2066 .fi
2067 .RE
2068 .sp
2069 .RS 4
2070 .nf
2071 Glob examples:
2072 .fi
2073 .RE
2074 .sp
2075 .RS 4
2076 .nf
2077 glob:*.c       any name ending in ".c" in the current directory
2078 *.c            any name ending in ".c" in the current directory
2079 **.c           any name ending in ".c" in the current directory, or
2080                any subdirectory
2081 foo/*.c        any name ending in ".c" in the directory foo
2082 foo/**.c       any name ending in ".c" in the directory foo, or any
2083                subdirectory
2084 .fi
2085 .RE
2086 .sp
2087 .RS 4
2088 .nf
2089 Regexp examples:
2090 .fi
2091 .RE
2092 .sp
2093 .RS 4
2094 .nf
2095 re:.*\e.c$      any name ending in ".c", anywhere in the repository
2096 .fi
2097 .RE
2098 .SH "ENVIRONMENT VARIABLES"
2099 .PP
2100 HG
2101 .RS 4
2102 Path to the
2103 \fIhg\fR
2104 executable, automatically passed when running hooks, extensions or external tools. If unset or empty, an executable named
2105 \fIhg\fR
2106 (with com/exe/bat/cmd extension on Windows) is searched.
2107 .RE
2108 .PP
2109 HGEDITOR
2110 .RS 4
2111 This is the name of the editor to use when committing. See EDITOR.
2112 .sp
2113 .RS 4
2114 .nf
2115 (deprecated, use .hgrc)
2116 .fi
2117 .RE
2118 .RE
2119 .PP
2120 HGENCODING
2121 .RS 4
2122 This overrides the default locale setting detected by Mercurial. This setting is used to convert data including usernames, changeset descriptions, tag names, and branches. This setting can be overridden with the \-\-encoding command\-line option.
2123 .RE
2124 .PP
2125 HGENCODINGMODE
2126 .RS 4
2127 This sets Mercurial\'s behavior for handling unknown characters while transcoding user inputs. The default is "strict", which causes Mercurial to abort if it can\'t translate a character. Other settings include "replace", which replaces unknown characters, and "ignore", which drops them. This setting can be overridden with the \-\-encodingmode command\-line option.
2128 .RE
2129 .PP
2130 HGMERGE
2131 .RS 4
2132 An executable to use for resolving merge conflicts. The program will be executed with three arguments: local file, remote file, ancestor file.
2133 .sp
2134 .RS 4
2135 .nf
2136 (deprecated, use .hgrc)
2137 .fi
2138 .RE
2139 .RE
2140 .PP
2141 HGRCPATH
2142 .RS 4
2143 A list of files or directories to search for hgrc files. Item separator is ":" on Unix, ";" on Windows. If HGRCPATH is not set, platform default search path is used. If empty, only .hg/hgrc of current repository is read.
2144 .sp
2145 .RS 4
2146 .nf
2147 For each element in path, if a directory, all entries in directory
2148 ending with ".rc" are added to path.  Else, element itself is
2149 added to path.
2150 .fi
2151 .RE
2152 .RE
2153 .PP
2154 HGUSER
2155 .RS 4
2156 This is the string used for the author of a commit.
2157 .sp
2158 .RS 4
2159 .nf
2160 (deprecated, use .hgrc)
2161 .fi
2162 .RE
2163 .RE
2164 .PP
2165 EMAIL
2166 .RS 4
2167 If HGUSER is not set, this will be used as the author for a commit.
2168 .RE
2169 .PP
2170 LOGNAME
2171 .RS 4
2172 If neither HGUSER nor EMAIL is set, LOGNAME will be used (with
2173 \fI@hostname\fR
2174 appended) as the author value for a commit.
2175 .RE
2176 .PP
2177 VISUAL
2178 .RS 4
2179 This is the name of the editor to use when committing. See EDITOR.
2180 .RE
2181 .PP
2182 EDITOR
2183 .RS 4
2184 Sometimes Mercurial needs to open a text file in an editor for a user to modify, for example when writing commit messages. The editor it uses is determined by looking at the environment variables HGEDITOR, VISUAL and EDITOR, in that order. The first non\-empty one is chosen. If all of them are empty, the editor defaults to
2185 \fIvi\fR.
2186 .RE
2187 .PP
2188 PYTHONPATH
2189 .RS 4
2190 This is used by Python to find imported modules and may need to be set appropriately if Mercurial is not installed system\-wide.
2191 .RE
2192 .SH "SPECIFYING SINGLE REVISIONS"
2193 .sp
2194 .RS 4
2195 .nf
2196 Mercurial accepts several notations for identifying individual
2197 revisions.
2198 .fi
2199 .RE
2200 .sp
2201 .RS 4
2202 .nf
2203 A plain integer is treated as a revision number.  Negative
2204 integers are treated as offsets from the tip, with \-1 denoting the
2205 tip.
2206 .fi
2207 .RE
2208 .sp
2209 .RS 4
2210 .nf
2211 A 40\-digit hexadecimal string is treated as a unique revision
2212 identifier.
2213 .fi
2214 .RE
2215 .sp
2216 .RS 4
2217 .nf
2218 A hexadecimal string less than 40 characters long is treated as a
2219 unique revision identifier, and referred to as a short\-form
2220 identifier.  A short\-form identifier is only valid if it is the
2221 prefix of one full\-length identifier.
2222 .fi
2223 .RE
2224 .sp
2225 .RS 4
2226 .nf
2227 Any other string is treated as a tag name, which is a symbolic
2228 name associated with a revision identifier.  Tag names may not
2229 contain the ":" character.
2230 .fi
2231 .RE
2232 .sp
2233 .RS 4
2234 .nf
2235 The reserved name "tip" is a special tag that always identifies
2236 the most recent revision.
2237 .fi
2238 .RE
2239 .sp
2240 .RS 4
2241 .nf
2242 The reserved name "null" indicates the null revision. This is the
2243 revision of an empty repository, and the parent of revision 0.
2244 .fi
2245 .RE
2246 .sp
2247 .RS 4
2248 .nf
2249 The reserved name "." indicates the working directory parent. If
2250 no working directory is checked out, it is equivalent to null.
2251 If an uncommitted merge is in progress, "." is the revision of
2252 the first parent.
2253 .fi
2254 .RE
2255 .SH "SPECIFYING MULTIPLE REVISIONS"
2256 .sp
2257 .RS 4
2258 .nf
2259 When Mercurial accepts more than one revision, they may be
2260 specified individually, or provided as a continuous range,
2261 separated by the ":" character.
2262 .fi
2263 .RE
2264 .sp
2265 .RS 4
2266 .nf
2267 The syntax of range notation is [BEGIN]:[END], where BEGIN and END
2268 are revision identifiers.  Both BEGIN and END are optional.  If
2269 BEGIN is not specified, it defaults to revision number 0.  If END
2270 is not specified, it defaults to the tip.  The range ":" thus
2271 means "all revisions".
2272 .fi
2273 .RE
2274 .sp
2275 .RS 4
2276 .nf
2277 If BEGIN is greater than END, revisions are treated in reverse
2278 order.
2279 .fi
2280 .RE
2281 .sp
2282 .RS 4
2283 .nf
2284 A range acts as a closed interval.  This means that a range of 3:5
2285 gives 3, 4 and 5.  Similarly, a range of 4:2 gives 4, 3, and 2.
2286 .fi
2287 .RE
2288 .SH FILES
2289 .PP
2290 .hgignore
2291 .RS 4
2292 This file contains regular expressions (one per line) that describe file names that should be ignored by hg. For details, see hgignore(5).
2293 .RE
2294 .PP
2295 .hgtags
2296 .RS 4
2297 This file contains changeset hash values and text tag names (one of each separated by spaces) that correspond to tagged versions of the repository contents.
2298 .RE
2299 .PP
2300 /etc/mercurial/hgrc, $HOME/.hgrc, .hg/hgrc
2301 .RS 4
2302 This file contains defaults and configuration. Values in .hg/hgrc override those in $HOME/.hgrc, and these override settings made in the global /etc/mercurial/hgrc configuration. See hgrc(5) for details of the contents and format of these files.
2303 .RE
2304 Some commands (e.g. revert) produce backup files ending in .orig, if the .orig file already exists and is not tracked by Mercurial, it will be overwritten.
2305 .sp
2306 .SH BUGS
2307 Probably lots, please post them to the mailing list (See Resources below) when you find them.
2308 .sp
2309 .SH "SEE ALSO"
2310 .IR hgignore (8),
2311 .IR hgrc (8).
2312 .sp
2313 .SH AUTHOR
2314 Written by Matt Mackall <mpm@selenic.com>
2315 .sp
2316 .SH RESOURCES
2317 \fIMain Web Site\fR[1]
2318 .sp
2319 \fISource code repository\fR[2]
2320 .sp
2321 \fIMailing list\fR[3]
2322 .sp
2323 .SH COPYING
2324 Copyright (C) 2005\-2007 Matt Mackall. Free use of this software is granted under the terms of the GNU General Public License (GPL).
2325 .sp
2326 .SH NOTES
2327 .IP " 1." 4
2328 Main Web Site
2329 .RS 4
2330 http://selenic.com/mercurial
2331 .RE
2332 .IP " 2." 4
2333 Source code repository
2334 .RS 4
2335 http://selenic.com/hg
2336 .RE
2337 .IP " 3." 4
2338 Mailing list
2339 .RS 4
2340 http://selenic.com/mailman/listinfo/mercurial
2341 .RE