##// END OF EJS Templates
commands: wrap docstrings at 70 characters...
Martin Geisler -
r9249:16f4cfc6 default
parent child Browse files
Show More
This diff has been collapsed as it changes many lines, (1020 lines changed) Show them Hide them
@@ -21,10 +21,11 b' import minirst'
21 21 def add(ui, repo, *pats, **opts):
22 22 """add the specified files on the next commit
23 23
24 Schedule files to be version controlled and added to the repository.
25
26 The files will be added to the repository at the next commit. To undo an
27 add before that, see hg forget.
24 Schedule files to be version controlled and added to the
25 repository.
26
27 The files will be added to the repository at the next commit. To
28 undo an add before that, see hg forget.
28 29
29 30 If no names are given, add all files to the repository.
30 31 """
@@ -49,16 +50,19 b' def add(ui, repo, *pats, **opts):'
49 50 def addremove(ui, repo, *pats, **opts):
50 51 """add all new files, delete all missing files
51 52
52 Add all new files and remove all missing files from the repository.
53
54 New files are ignored if they match any of the patterns in .hgignore. As
55 with add, these changes take effect at the next commit.
56
57 Use the -s/--similarity option to detect renamed files. With a parameter
58 greater than 0, this compares every removed file with every added file and
59 records those similar enough as renames. This option takes a percentage
60 between 0 (disabled) and 100 (files must be identical) as its parameter.
61 Detecting renamed files this way can be expensive.
53 Add all new files and remove all missing files from the
54 repository.
55
56 New files are ignored if they match any of the patterns in
57 .hgignore. As with add, these changes take effect at the next
58 commit.
59
60 Use the -s/--similarity option to detect renamed files. With a
61 parameter greater than 0, this compares every removed file with
62 every added file and records those similar enough as renames. This
63 option takes a percentage between 0 (disabled) and 100 (files must
64 be identical) as its parameter. Detecting renamed files this way
65 can be expensive.
62 66 """
63 67 try:
64 68 sim = float(opts.get('similarity') or 0)
@@ -71,13 +75,16 b' def addremove(ui, repo, *pats, **opts):'
71 75 def annotate(ui, repo, *pats, **opts):
72 76 """show changeset information by line for each file
73 77
74 List changes in files, showing the revision id responsible for each line
75
76 This command is useful for discovering when a change was made and by whom.
77
78 Without the -a/--text option, annotate will avoid processing files it
79 detects as binary. With -a, annotate will annotate the file anyway,
80 although the results will probably be neither useful nor desirable.
78 List changes in files, showing the revision id responsible for
79 each line
80
81 This command is useful for discovering when a change was made and
82 by whom.
83
84 Without the -a/--text option, annotate will avoid processing files
85 it detects as binary. With -a, annotate will annotate the file
86 anyway, although the results will probably be neither useful
87 nor desirable.
81 88 """
82 89 datefunc = ui.quiet and util.shortdate or util.datestr
83 90 getdate = util.cachefunc(lambda x: datefunc(x[0].date()))
@@ -131,10 +138,11 b' def annotate(ui, repo, *pats, **opts):'
131 138 def archive(ui, repo, dest, **opts):
132 139 '''create an unversioned archive of a repository revision
133 140
134 By default, the revision used is the parent of the working directory; use
135 -r/--rev to specify a different revision.
136
137 To specify the type of archive to create, use -t/--type. Valid types are::
141 By default, the revision used is the parent of the working
142 directory; use -r/--rev to specify a different revision.
143
144 To specify the type of archive to create, use -t/--type. Valid
145 types are::
138 146
139 147 "files" (default): a directory full of files
140 148 "tar": tar archive, uncompressed
@@ -143,12 +151,13 b' def archive(ui, repo, dest, **opts):'
143 151 "uzip": zip archive, uncompressed
144 152 "zip": zip archive, compressed using deflate
145 153
146 The exact name of the destination archive or directory is given using a
147 format string; see 'hg help export' for details.
148
149 Each member added to an archive file has a directory prefix prepended. Use
150 -p/--prefix to specify a format string for the prefix. The default is the
151 basename of the archive, with suffixes removed.
154 The exact name of the destination archive or directory is given
155 using a format string; see 'hg help export' for details.
156
157 Each member added to an archive file has a directory prefix
158 prepended. Use -p/--prefix to specify a format string for the
159 prefix. The default is the basename of the archive, with suffixes
160 removed.
152 161 '''
153 162
154 163 ctx = repo[opts.get('rev')]
@@ -173,17 +182,17 b' def archive(ui, repo, dest, **opts):'
173 182 def backout(ui, repo, node=None, rev=None, **opts):
174 183 '''reverse effect of earlier changeset
175 184
176 Commit the backed out changes as a new changeset. The new changeset is a
177 child of the backed out changeset.
178
179 If you backout a changeset other than the tip, a new head is created. This
180 head will be the new tip and you should merge this backout changeset with
181 another head.
182
183 The --merge option remembers the parent of the working directory before
184 starting the backout, then merges the new head with that changeset
185 afterwards. This saves you from doing the merge by hand. The result of
186 this merge is not committed, as with a normal merge.
185 Commit the backed out changes as a new changeset. The new
186 changeset is a child of the backed out changeset.
187
188 If you backout a changeset other than the tip, a new head is
189 created. This head will be the new tip and you should merge this
190 backout changeset with another head.
191
192 The --merge option remembers the parent of the working directory
193 before starting the backout, then merges the new head with that
194 changeset afterwards. This saves you from doing the merge by hand.
195 The result of this merge is not committed, as with a normal merge.
187 196
188 197 See 'hg help dates' for a list of formats valid for -d/--date.
189 198 '''
@@ -261,22 +270,23 b' def bisect(ui, repo, rev=None, extra=Non'
261 270 reset=None, good=None, bad=None, skip=None, noupdate=None):
262 271 """subdivision search of changesets
263 272
264 This command helps to find changesets which introduce problems. To use,
265 mark the earliest changeset you know exhibits the problem as bad, then
266 mark the latest changeset which is free from the problem as good. Bisect
267 will update your working directory to a revision for testing (unless the
268 -U/--noupdate option is specified). Once you have performed tests, mark
269 the working directory as good or bad, and bisect will either update to
270 another candidate changeset or announce that it has found the bad
271 revision.
272
273 As a shortcut, you can also use the revision argument to mark a revision
274 as good or bad without checking it out first.
275
276 If you supply a command, it will be used for automatic bisection. Its exit
277 status will be used to mark revisions as good or bad: status 0 means good,
278 125 means to skip the revision, 127 (command not found) will abort the
279 bisection, and any other non-zero exit status means the revision is bad.
273 This command helps to find changesets which introduce problems. To
274 use, mark the earliest changeset you know exhibits the problem as
275 bad, then mark the latest changeset which is free from the problem
276 as good. Bisect will update your working directory to a revision
277 for testing (unless the -U/--noupdate option is specified). Once
278 you have performed tests, mark the working directory as good or
279 bad, and bisect will either update to another candidate changeset
280 or announce that it has found the bad revision.
281
282 As a shortcut, you can also use the revision argument to mark a
283 revision as good or bad without checking it out first.
284
285 If you supply a command, it will be used for automatic bisection.
286 Its exit status will be used to mark revisions as good or bad:
287 status 0 means good, 125 means to skip the revision, 127
288 (command not found) will abort the bisection, and any other
289 non-zero exit status means the revision is bad.
280 290 """
281 291 def print_result(nodes, good):
282 292 displayer = cmdutil.show_changeset(ui, repo, {})
@@ -398,19 +408,21 b' def bisect(ui, repo, rev=None, extra=Non'
398 408 def branch(ui, repo, label=None, **opts):
399 409 """set or show the current branch name
400 410
401 With no argument, show the current branch name. With one argument, set the
402 working directory branch name (the branch will not exist in the repository
403 until the next commit). Standard practice recommends that primary
404 development take place on the 'default' branch.
405
406 Unless -f/--force is specified, branch will not let you set a branch name
407 that already exists, even if it's inactive.
408
409 Use -C/--clean to reset the working directory branch to that of the parent
410 of the working directory, negating a previous branch change.
411
412 Use the command 'hg update' to switch to an existing branch. Use 'hg
413 commit --close-branch' to mark this branch as closed.
411 With no argument, show the current branch name. With one argument,
412 set the working directory branch name (the branch will not exist
413 in the repository until the next commit). Standard practice
414 recommends that primary development take place on the 'default'
415 branch.
416
417 Unless -f/--force is specified, branch will not let you set a
418 branch name that already exists, even if it's inactive.
419
420 Use -C/--clean to reset the working directory branch to that of
421 the parent of the working directory, negating a previous branch
422 change.
423
424 Use the command 'hg update' to switch to an existing branch. Use
425 'hg commit --close-branch' to mark this branch as closed.
414 426 """
415 427
416 428 if opts.get('clean'):
@@ -430,12 +442,12 b' def branch(ui, repo, label=None, **opts)'
430 442 def branches(ui, repo, active=False, closed=False):
431 443 """list repository named branches
432 444
433 List the repository's named branches, indicating which ones are inactive.
434 If -c/--closed is specified, also list branches which have been marked
435 closed (see hg commit --close-branch).
436
437 If -a/--active is specified, only show active branches. A branch is
438 considered active if it contains repository heads.
445 List the repository's named branches, indicating which ones are
446 inactive. If -c/--closed is specified, also list branches which have
447 been marked closed (see hg commit --close-branch).
448
449 If -a/--active is specified, only show active branches. A branch
450 is considered active if it contains repository heads.
439 451
440 452 Use the command 'hg update' to switch to an existing branch.
441 453 """
@@ -472,24 +484,25 b' def branches(ui, repo, active=False, clo'
472 484 def bundle(ui, repo, fname, dest=None, **opts):
473 485 """create a changegroup file
474 486
475 Generate a compressed changegroup file collecting changesets not known to
476 be in another repository.
477
478 If no destination repository is specified the destination is assumed to
479 have all the nodes specified by one or more --base parameters. To create a
480 bundle containing all changesets, use -a/--all (or --base null).
481
482 You can change compression method with the -t/--type option. The available
483 compression methods are: none, bzip2, and gzip (by default, bundles are
484 compressed using bzip2).
485
486 The bundle file can then be transferred using conventional means and
487 applied to another repository with the unbundle or pull command. This is
488 useful when direct push and pull are not available or when exporting an
489 entire repository is undesirable.
490
491 Applying bundles preserves all changeset contents including permissions,
492 copy/rename information, and revision history.
487 Generate a compressed changegroup file collecting changesets not
488 known to be in another repository.
489
490 If no destination repository is specified the destination is
491 assumed to have all the nodes specified by one or more --base
492 parameters. To create a bundle containing all changesets, use
493 -a/--all (or --base null).
494
495 You can change compression method with the -t/--type option.
496 The available compression methods are: none, bzip2, and
497 gzip (by default, bundles are compressed using bzip2).
498
499 The bundle file can then be transferred using conventional means
500 and applied to another repository with the unbundle or pull
501 command. This is useful when direct push and pull are not
502 available or when exporting an entire repository is undesirable.
503
504 Applying bundles preserves all changeset contents including
505 permissions, copy/rename information, and revision history.
493 506 """
494 507 revs = opts.get('rev') or None
495 508 if revs:
@@ -546,13 +559,13 b' def bundle(ui, repo, fname, dest=None, *'
546 559 def cat(ui, repo, file1, *pats, **opts):
547 560 """output the current or given revision of files
548 561
549 Print the specified files as they were at the given revision. If no
550 revision is given, the parent of the working directory is used, or tip if
551 no revision is checked out.
552
553 Output may be to a file, in which case the name of the file is given using
554 a format string. The formatting rules are the same as for the export
555 command, with the following additions::
562 Print the specified files as they were at the given revision. If
563 no revision is given, the parent of the working directory is used,
564 or tip if no revision is checked out.
565
566 Output may be to a file, in which case the name of the file is
567 given using a format string. The formatting rules are the same as
568 for the export command, with the following additions::
556 569
557 570 %s basename of file being printed
558 571 %d dirname of file being printed, or '.' if in repository root
@@ -575,42 +588,46 b' def clone(ui, source, dest=None, **opts)'
575 588
576 589 Create a copy of an existing repository in a new directory.
577 590
578 If no destination directory name is specified, it defaults to the basename
579 of the source.
580
581 The location of the source is added to the new repository's .hg/hgrc file,
582 as the default to be used for future pulls.
583
584 If you use the -r/--rev option to clone up to a specific revision, no
585 subsequent revisions (including subsequent tags) will be present in the
586 cloned repository. This option implies --pull, even on local repositories.
587
588 By default, clone will check out the head of the 'default' branch. If the
589 -U/--noupdate option is used, the new clone will contain only a repository
590 (.hg) and no working copy (the working copy parent is the null revision).
591 If no destination directory name is specified, it defaults to the
592 basename of the source.
593
594 The location of the source is added to the new repository's
595 .hg/hgrc file, as the default to be used for future pulls.
596
597 If you use the -r/--rev option to clone up to a specific revision,
598 no subsequent revisions (including subsequent tags) will be
599 present in the cloned repository. This option implies --pull, even
600 on local repositories.
601
602 By default, clone will check out the head of the 'default' branch.
603 If the -U/--noupdate option is used, the new clone will contain
604 only a repository (.hg) and no working copy (the working copy
605 parent is the null revision).
591 606
592 607 See 'hg help urls' for valid source format details.
593 608
594 609 It is possible to specify an ssh:// URL as the destination, but no
595 .hg/hgrc and working directory will be created on the remote side. Please
596 see 'hg help urls' for important details about ssh:// URLs.
597
598 For efficiency, hardlinks are used for cloning whenever the source and
599 destination are on the same filesystem (note this applies only to the
600 repository data, not to the checked out files). Some filesystems, such as
601 AFS, implement hardlinking incorrectly, but do not report errors. In these
602 cases, use the --pull option to avoid hardlinking.
603
604 In some cases, you can clone repositories and checked out files using full
605 hardlinks with ::
610 .hg/hgrc and working directory will be created on the remote side.
611 Please see 'hg help urls' for important details about ssh:// URLs.
612
613 For efficiency, hardlinks are used for cloning whenever the source
614 and destination are on the same filesystem (note this applies only
615 to the repository data, not to the checked out files). Some
616 filesystems, such as AFS, implement hardlinking incorrectly, but
617 do not report errors. In these cases, use the --pull option to
618 avoid hardlinking.
619
620 In some cases, you can clone repositories and checked out files
621 using full hardlinks with ::
606 622
607 623 $ cp -al REPO REPOCLONE
608 624
609 This is the fastest way to clone, but it is not always safe. The operation
610 is not atomic (making sure REPO is not modified during the operation is up
611 to you) and you have to make sure your editor breaks hardlinks (Emacs and
612 most Linux Kernel tools do so). Also, this is not compatible with certain
613 extensions that place their metadata under the .hg directory, such as mq.
625 This is the fastest way to clone, but it is not always safe. The
626 operation is not atomic (making sure REPO is not modified during
627 the operation is up to you) and you have to make sure your editor
628 breaks hardlinks (Emacs and most Linux Kernel tools do so). Also,
629 this is not compatible with certain extensions that place their
630 metadata under the .hg directory, such as mq.
614 631 """
615 632 hg.clone(cmdutil.remoteui(ui, opts), source, dest,
616 633 pull=opts.get('pull'),
@@ -622,17 +639,17 b' def commit(ui, repo, *pats, **opts):'
622 639 """commit the specified files or all outstanding changes
623 640
624 641 Commit changes to the given files into the repository. Unlike a
625 centralized RCS, this operation is a local operation. See hg push for a
626 way to actively distribute your changes.
627
628 If a list of files is omitted, all changes reported by "hg status" will be
629 committed.
630
631 If you are committing the result of a merge, do not provide any filenames
632 or -I/-X filters.
633
634 If no commit message is specified, the configured editor is started to
635 prompt you for a message.
642 centralized RCS, this operation is a local operation. See hg push
643 for a way to actively distribute your changes.
644
645 If a list of files is omitted, all changes reported by "hg status"
646 will be committed.
647
648 If you are committing the result of a merge, do not provide any
649 filenames or -I/-X filters.
650
651 If no commit message is specified, the configured editor is
652 started to prompt you for a message.
636 653
637 654 See 'hg help dates' for a list of formats valid for -d/--date.
638 655 """
@@ -670,16 +687,16 b' def commit(ui, repo, *pats, **opts):'
670 687 def copy(ui, repo, *pats, **opts):
671 688 """mark files as copied for the next commit
672 689
673 Mark dest as having copies of source files. If dest is a directory, copies
674 are put in that directory. If dest is a file, the source must be a single
675 file.
676
677 By default, this command copies the contents of files as they exist in the
678 working directory. If invoked with -A/--after, the operation is recorded,
679 but no copying is performed.
680
681 This command takes effect with the next commit. To undo a copy before
682 that, see hg revert.
690 Mark dest as having copies of source files. If dest is a
691 directory, copies are put in that directory. If dest is a file,
692 the source must be a single file.
693
694 By default, this command copies the contents of files as they
695 exist in the working directory. If invoked with -A/--after, the
696 operation is recorded, but no copying is performed.
697
698 This command takes effect with the next commit. To undo a copy
699 before that, see hg revert.
683 700 """
684 701 wlock = repo.wlock(False)
685 702 try:
@@ -782,14 +799,14 b' def showconfig(ui, repo, *values, **opts'
782 799
783 800 With no arguments, print names and values of all config items.
784 801
785 With one argument of the form section.name, print just the value of that
786 config item.
787
788 With multiple arguments, print names and values of all config items with
789 matching section names.
790
791 With --debug, the source (filename and line number) is printed for each
792 config item.
802 With one argument of the form section.name, print just the value
803 of that config item.
804
805 With multiple arguments, print names and values of all config
806 items with matching section names.
807
808 With --debug, the source (filename and line number) is printed
809 for each config item.
793 810 """
794 811
795 812 untrusted = bool(opts.get('untrusted'))
@@ -816,8 +833,8 b' def showconfig(ui, repo, *values, **opts'
816 833 def debugsetparents(ui, repo, rev1, rev2=None):
817 834 """manually set the parents of the current working directory
818 835
819 This is useful for writing repository conversion tools, but should be used
820 with care.
836 This is useful for writing repository conversion tools, but should
837 be used with care.
821 838 """
822 839
823 840 if not rev2:
@@ -1051,21 +1068,22 b' def diff(ui, repo, *pats, **opts):'
1051 1068
1052 1069 Differences between files are shown using the unified diff format.
1053 1070
1054 NOTE: diff may generate unexpected results for merges, as it will default
1055 to comparing against the working directory's first parent changeset if no
1056 revisions are specified.
1057
1058 When two revision arguments are given, then changes are shown between
1059 those revisions. If only one revision is specified then that revision is
1060 compared to the working directory, and, when no revisions are specified,
1061 the working directory files are compared to its parent.
1062
1063 Without the -a/--text option, diff will avoid generating diffs of files it
1064 detects as binary. With -a, diff will generate a diff anyway, probably
1065 with undesirable results.
1066
1067 Use the -g/--git option to generate diffs in the git extended diff format.
1068 For more information, read 'hg help diffs'.
1071 NOTE: diff may generate unexpected results for merges, as it will
1072 default to comparing against the working directory's first parent
1073 changeset if no revisions are specified.
1074
1075 When two revision arguments are given, then changes are shown
1076 between those revisions. If only one revision is specified then
1077 that revision is compared to the working directory, and, when no
1078 revisions are specified, the working directory files are compared
1079 to its parent.
1080
1081 Without the -a/--text option, diff will avoid generating diffs of
1082 files it detects as binary. With -a, diff will generate a diff
1083 anyway, probably with undesirable results.
1084
1085 Use the -g/--git option to generate diffs in the git extended diff
1086 format. For more information, read 'hg help diffs'.
1069 1087 """
1070 1088
1071 1089 revs = opts.get('rev')
@@ -1090,14 +1108,15 b' def export(ui, repo, *changesets, **opts'
1090 1108
1091 1109 Print the changeset header and diffs for one or more revisions.
1092 1110
1093 The information shown in the changeset header is: author, changeset hash,
1094 parent(s) and commit comment.
1095
1096 NOTE: export may generate unexpected diff output for merge changesets, as
1097 it will compare the merge changeset against its first parent only.
1098
1099 Output may be to a file, in which case the name of the file is given using
1100 a format string. The formatting rules are as follows::
1111 The information shown in the changeset header is: author,
1112 changeset hash, parent(s) and commit comment.
1113
1114 NOTE: export may generate unexpected diff output for merge
1115 changesets, as it will compare the merge changeset against its
1116 first parent only.
1117
1118 Output may be to a file, in which case the name of the file is
1119 given using a format string. The formatting rules are as follows::
1101 1120
1102 1121 %% literal "%" character
1103 1122 %H changeset hash (40 bytes of hexadecimal)
@@ -1108,15 +1127,15 b' def export(ui, repo, *changesets, **opts'
1108 1127 %n zero-padded sequence number, starting at 1
1109 1128 %r zero-padded changeset revision number
1110 1129
1111 Without the -a/--text option, export will avoid generating diffs of files
1112 it detects as binary. With -a, export will generate a diff anyway,
1113 probably with undesirable results.
1114
1115 Use the -g/--git option to generate diffs in the git extended diff format.
1116 See 'hg help diffs' for more information.
1117
1118 With the --switch-parent option, the diff will be against the second
1119 parent. It can be useful to review a merge.
1130 Without the -a/--text option, export will avoid generating diffs
1131 of files it detects as binary. With -a, export will generate a
1132 diff anyway, probably with undesirable results.
1133
1134 Use the -g/--git option to generate diffs in the git extended diff
1135 format. See 'hg help diffs' for more information.
1136
1137 With the --switch-parent option, the diff will be against the
1138 second parent. It can be useful to review a merge.
1120 1139 """
1121 1140 if not changesets:
1122 1141 raise util.Abort(_("export requires at least one changeset"))
@@ -1132,11 +1151,12 b' def export(ui, repo, *changesets, **opts'
1132 1151 def forget(ui, repo, *pats, **opts):
1133 1152 """forget the specified files on the next commit
1134 1153
1135 Mark the specified files so they will no longer be tracked after the next
1136 commit.
1137
1138 This only removes files from the current branch, not from the entire
1139 project history, and it does not delete them from the working directory.
1154 Mark the specified files so they will no longer be tracked
1155 after the next commit.
1156
1157 This only removes files from the current branch, not from the
1158 entire project history, and it does not delete them from the
1159 working directory.
1140 1160
1141 1161 To undo a forget before the next commit, see hg add.
1142 1162 """
@@ -1165,13 +1185,15 b' def grep(ui, repo, pattern, *pats, **opt'
1165 1185 Search revisions of files for a regular expression.
1166 1186
1167 1187 This command behaves differently than Unix grep. It only accepts
1168 Python/Perl regexps. It searches repository history, not the working
1169 directory. It always prints the revision number in which a match appears.
1170
1171 By default, grep only prints output for the first revision of a file in
1172 which it finds a match. To get it to print every revision that contains a
1173 change in match status ("-" for a match that becomes a non-match, or "+"
1174 for a non-match that becomes a match), use the --all flag.
1188 Python/Perl regexps. It searches repository history, not the
1189 working directory. It always prints the revision number in which a
1190 match appears.
1191
1192 By default, grep only prints output for the first revision of a
1193 file in which it finds a match. To get it to print every revision
1194 that contains a change in match status ("-" for a match that
1195 becomes a non-match, or "+" for a non-match that becomes a match),
1196 use the --all flag.
1175 1197 """
1176 1198 reflags = 0
1177 1199 if opts.get('ignore_case'):
@@ -1334,23 +1356,23 b' def heads(ui, repo, *branchrevs, **opts)'
1334 1356
1335 1357 With no arguments, show all repository head changesets.
1336 1358
1337 Repository "heads" are changesets that don't have child changesets. They
1338 are where development generally takes place and are the usual targets for
1339 update and merge operations.
1340
1341 If one or more REV is given, the "branch heads" will be shown for the
1342 named branch associated with that revision. The name of the branch is
1343 called the revision's branch tag.
1344
1345 Branch heads are revisions on a given named branch that do not have any
1346 descendants on the same branch. A branch head could be a true head or it
1347 could be the last changeset on a branch before a new branch was created.
1348 If none of the branch heads are true heads, the branch is considered
1349 inactive. If -c/--closed is specified, also show branch heads marked
1350 closed (see hg commit --close-branch).
1351
1352 If STARTREV is specified only those heads (or branch heads) that are
1353 descendants of STARTREV will be displayed.
1359 Repository "heads" are changesets that don't have child
1360 changesets. They are where development generally takes place and
1361 are the usual targets for update and merge operations.
1362
1363 If one or more REV is given, the "branch heads" will be shown for
1364 the named branch associated with that revision. The name of the
1365 branch is called the revision's branch tag.
1366
1367 Branch heads are revisions on a given named branch that do not have
1368 any descendants on the same branch. A branch head could be a true head
1369 or it could be the last changeset on a branch before a new branch
1370 was created. If none of the branch heads are true heads, the branch
1371 is considered inactive. If -c/--closed is specified, also show branch
1372 heads marked closed (see hg commit --close-branch).
1373
1374 If STARTREV is specified only those heads (or branch heads) that
1375 are descendants of STARTREV will be displayed.
1354 1376 """
1355 1377 if opts.get('rev'):
1356 1378 start = repo.lookup(opts['rev'])
@@ -1398,8 +1420,8 b' def help_(ui, name=None, with_version=Fa'
1398 1420
1399 1421 With no arguments, print a list of commands with short help messages.
1400 1422
1401 Given a topic, extension, or command name, print help for that topic.
1402 """
1423 Given a topic, extension, or command name, print help for that
1424 topic."""
1403 1425 option_lists = []
1404 1426 textwidth = util.termwidth() - 2
1405 1427
@@ -1612,15 +1634,16 b' def identify(ui, repo, source=None,'
1612 1634 rev=None, num=None, id=None, branch=None, tags=None):
1613 1635 """identify the working copy or specified revision
1614 1636
1615 With no revision, print a summary of the current state of the repository.
1616
1617 Specifying a path to a repository root or Mercurial bundle will cause
1618 lookup to operate on that repository/bundle.
1619
1620 This summary identifies the repository state using one or two parent hash
1621 identifiers, followed by a "+" if there are uncommitted changes in the
1622 working directory, a list of tags for this revision and a branch name for
1623 non-default branches.
1637 With no revision, print a summary of the current state of the
1638 repository.
1639
1640 Specifying a path to a repository root or Mercurial bundle will
1641 cause lookup to operate on that repository/bundle.
1642
1643 This summary identifies the repository state using one or two
1644 parent hash identifiers, followed by a "+" if there are
1645 uncommitted changes in the working directory, a list of tags for
1646 this revision and a branch name for non-default branches.
1624 1647 """
1625 1648
1626 1649 if not repo and not source:
@@ -1687,31 +1710,33 b' def import_(ui, repo, patch1, *patches, '
1687 1710
1688 1711 Import a list of patches and commit them individually.
1689 1712
1690 If there are outstanding changes in the working directory, import will
1691 abort unless given the -f/--force flag.
1692
1693 You can import a patch straight from a mail message. Even patches as
1694 attachments work (to use the body part, it must have type text/plain or
1695 text/x-patch). From and Subject headers of email message are used as
1696 default committer and commit message. All text/plain body parts before
1697 first diff are added to commit message.
1698
1699 If the imported patch was generated by hg export, user and description
1700 from patch override values from message headers and body. Values given on
1701 command line with -m/--message and -u/--user override these.
1702
1703 If --exact is specified, import will set the working directory to the
1704 parent of each patch before applying it, and will abort if the resulting
1705 changeset has a different ID than the one recorded in the patch. This may
1706 happen due to character set problems or other deficiencies in the text
1707 patch format.
1708
1709 With -s/--similarity, hg will attempt to discover renames and copies in
1710 the patch in the same way as 'addremove'.
1711
1712 To read a patch from standard input, use "-" as the patch name. If a URL
1713 is specified, the patch will be downloaded from it. See 'hg help dates'
1714 for a list of formats valid for -d/--date.
1713 If there are outstanding changes in the working directory, import
1714 will abort unless given the -f/--force flag.
1715
1716 You can import a patch straight from a mail message. Even patches
1717 as attachments work (to use the body part, it must have type
1718 text/plain or text/x-patch). From and Subject headers of email
1719 message are used as default committer and commit message. All
1720 text/plain body parts before first diff are added to commit
1721 message.
1722
1723 If the imported patch was generated by hg export, user and
1724 description from patch override values from message headers and
1725 body. Values given on command line with -m/--message and -u/--user
1726 override these.
1727
1728 If --exact is specified, import will set the working directory to
1729 the parent of each patch before applying it, and will abort if the
1730 resulting changeset has a different ID than the one recorded in
1731 the patch. This may happen due to character set problems or other
1732 deficiencies in the text patch format.
1733
1734 With -s/--similarity, hg will attempt to discover renames and
1735 copies in the patch in the same way as 'addremove'.
1736
1737 To read a patch from standard input, use "-" as the patch name. If
1738 a URL is specified, the patch will be downloaded from it.
1739 See 'hg help dates' for a list of formats valid for -d/--date.
1715 1740 """
1716 1741 patches = (patch1,) + patches
1717 1742
@@ -1811,12 +1836,12 b' def import_(ui, repo, patch1, *patches, '
1811 1836 def incoming(ui, repo, source="default", **opts):
1812 1837 """show new changesets found in source
1813 1838
1814 Show new changesets found in the specified path/URL or the default pull
1815 location. These are the changesets that would have been pulled if a pull
1816 at the time you issued this command.
1817
1818 For remote repository, using --bundle avoids downloading the changesets
1819 twice if the incoming is followed by a pull.
1839 Show new changesets found in the specified path/URL or the default
1840 pull location. These are the changesets that would have been pulled
1841 if a pull at the time you issued this command.
1842
1843 For remote repository, using --bundle avoids downloading the
1844 changesets twice if the incoming is followed by a pull.
1820 1845
1821 1846 See pull for valid source format details.
1822 1847 """
@@ -1880,33 +1905,33 b' def incoming(ui, repo, source="default",'
1880 1905 def init(ui, dest=".", **opts):
1881 1906 """create a new repository in the given directory
1882 1907
1883 Initialize a new repository in the given directory. If the given directory
1884 does not exist, it will be created.
1908 Initialize a new repository in the given directory. If the given
1909 directory does not exist, it will be created.
1885 1910
1886 1911 If no directory is given, the current directory is used.
1887 1912
1888 It is possible to specify an ssh:// URL as the destination. See 'hg help
1889 urls' for more information.
1913 It is possible to specify an ssh:// URL as the destination.
1914 See 'hg help urls' for more information.
1890 1915 """
1891 1916 hg.repository(cmdutil.remoteui(ui, opts), dest, create=1)
1892 1917
1893 1918 def locate(ui, repo, *pats, **opts):
1894 1919 """locate files matching specific patterns
1895 1920
1896 Print files under Mercurial control in the working directory whose names
1897 match the given patterns.
1921 Print files under Mercurial control in the working directory whose
1922 names match the given patterns.
1898 1923
1899 1924 By default, this command searches all directories in the working
1900 directory. To search just the current directory and its subdirectories,
1901 use "--include .".
1902
1903 If no patterns are given to match, this command prints the names of all
1904 files under Mercurial control in the working directory.
1905
1906 If you want to feed the output of this command into the "xargs" command,
1907 use the -0 option to both this command and "xargs". This will avoid the
1908 problem of "xargs" treating single filenames that contain whitespace as
1909 multiple filenames.
1925 directory. To search just the current directory and its
1926 subdirectories, use "--include .".
1927
1928 If no patterns are given to match, this command prints the names
1929 of all files under Mercurial control in the working directory.
1930
1931 If you want to feed the output of this command into the "xargs"
1932 command, use the -0 option to both this command and "xargs". This
1933 will avoid the problem of "xargs" treating single filenames that
1934 contain whitespace as multiple filenames.
1910 1935 """
1911 1936 end = opts.get('print0') and '\0' or '\n'
1912 1937 rev = opts.get('rev') or None
@@ -1928,29 +1953,30 b' def locate(ui, repo, *pats, **opts):'
1928 1953 def log(ui, repo, *pats, **opts):
1929 1954 """show revision history of entire repository or files
1930 1955
1931 Print the revision history of the specified files or the entire project.
1932
1933 File history is shown without following rename or copy history of files.
1934 Use -f/--follow with a filename to follow history across renames and
1935 copies. --follow without a filename will only show ancestors or
1936 descendants of the starting revision. --follow-first only follows the
1937 first parent of merge revisions.
1938
1939 If no revision range is specified, the default is tip:0 unless --follow is
1940 set, in which case the working directory parent is used as the starting
1941 revision.
1956 Print the revision history of the specified files or the entire
1957 project.
1958
1959 File history is shown without following rename or copy history of
1960 files. Use -f/--follow with a filename to follow history across
1961 renames and copies. --follow without a filename will only show
1962 ancestors or descendants of the starting revision. --follow-first
1963 only follows the first parent of merge revisions.
1964
1965 If no revision range is specified, the default is tip:0 unless
1966 --follow is set, in which case the working directory parent is
1967 used as the starting revision.
1942 1968
1943 1969 See 'hg help dates' for a list of formats valid for -d/--date.
1944 1970
1945 By default this command prints revision number and changeset id, tags,
1946 non-trivial parents, user, date and time, and a summary for each commit.
1947 When the -v/--verbose switch is used, the list of changed files and full
1948 commit message are shown.
1971 By default this command prints revision number and changeset id,
1972 tags, non-trivial parents, user, date and time, and a summary for
1973 each commit. When the -v/--verbose switch is used, the list of
1974 changed files and full commit message are shown.
1949 1975
1950 1976 NOTE: log -p/--patch may generate unexpected diff output for merge
1951 changesets, as it will only compare the merge changeset against its first
1952 parent. Also, only files different from BOTH parents will appear in
1953 files:.
1977 changesets, as it will only compare the merge changeset against
1978 its first parent. Also, only files different from BOTH parents
1979 will appear in files:.
1954 1980 """
1955 1981
1956 1982 get = util.cachefunc(lambda r: repo[r].changeset())
@@ -2053,9 +2079,9 b' def log(ui, repo, *pats, **opts):'
2053 2079 def manifest(ui, repo, node=None, rev=None):
2054 2080 """output the current or given revision of the project manifest
2055 2081
2056 Print a list of version controlled files for the given revision. If no
2057 revision is given, the first parent of the working directory is used, or
2058 the null revision if no revision is checked out.
2082 Print a list of version controlled files for the given revision.
2083 If no revision is given, the first parent of the working directory
2084 is used, or the null revision if no revision is checked out.
2059 2085
2060 2086 With -v, print file permissions, symlink and executable bits.
2061 2087 With --debug, print file revision hashes.
@@ -2079,17 +2105,18 b' def manifest(ui, repo, node=None, rev=No'
2079 2105 def merge(ui, repo, node=None, **opts):
2080 2106 """merge working directory with another revision
2081 2107
2082 The current working directory is updated with all changes made in the
2083 requested revision since the last common predecessor revision.
2084
2085 Files that changed between either parent are marked as changed for the
2086 next commit and a commit must be performed before any further updates to
2087 the repository are allowed. The next commit will have two parents.
2088
2089 If no revision is specified, the working directory's parent is a head
2090 revision, and the current branch contains exactly one other head, the
2091 other head is merged with by default. Otherwise, an explicit revision with
2092 which to merge with must be provided.
2108 The current working directory is updated with all changes made in
2109 the requested revision since the last common predecessor revision.
2110
2111 Files that changed between either parent are marked as changed for
2112 the next commit and a commit must be performed before any further
2113 updates to the repository are allowed. The next commit will have
2114 two parents.
2115
2116 If no revision is specified, the working directory's parent is a
2117 head revision, and the current branch contains exactly one other
2118 head, the other head is merged with by default. Otherwise, an
2119 explicit revision with which to merge with must be provided.
2093 2120 """
2094 2121
2095 2122 if opts.get('rev') and node:
@@ -2136,9 +2163,9 b' def merge(ui, repo, node=None, **opts):'
2136 2163 def outgoing(ui, repo, dest=None, **opts):
2137 2164 """show changesets not found in destination
2138 2165
2139 Show changesets not found in the specified destination repository or the
2140 default push location. These are the changesets that would be pushed if a
2141 push was requested.
2166 Show changesets not found in the specified destination repository
2167 or the default push location. These are the changesets that would
2168 be pushed if a push was requested.
2142 2169
2143 2170 See pull for valid destination format details.
2144 2171 """
@@ -2171,10 +2198,11 b' def outgoing(ui, repo, dest=None, **opts'
2171 2198 def parents(ui, repo, file_=None, **opts):
2172 2199 """show the parents of the working directory or revision
2173 2200
2174 Print the working directory's parent revisions. If a revision is given via
2175 -r/--rev, the parent of that revision will be printed. If a file argument
2176 is given, the revision in which the file was last changed (before the
2177 working directory revision or the argument to --rev if given) is printed.
2201 Print the working directory's parent revisions. If a revision is
2202 given via -r/--rev, the parent of that revision will be printed.
2203 If a file argument is given, the revision in which the file was
2204 last changed (before the working directory revision or the
2205 argument to --rev if given) is printed.
2178 2206 """
2179 2207 rev = opts.get('rev')
2180 2208 if rev:
@@ -2210,11 +2238,11 b' def parents(ui, repo, file_=None, **opts'
2210 2238 def paths(ui, repo, search=None):
2211 2239 """show aliases for remote repositories
2212 2240
2213 Show definition of symbolic path name NAME. If no name is given, show
2214 definition of all available names.
2215
2216 Path names are defined in the [paths] section of /etc/mercurial/hgrc and
2217 $HOME/.hgrc. If run inside a repository, .hg/hgrc is used, too.
2241 Show definition of symbolic path name NAME. If no name is given,
2242 show definition of all available names.
2243
2244 Path names are defined in the [paths] section of /etc/mercurial/hgrc
2245 and $HOME/.hgrc. If run inside a repository, .hg/hgrc is used, too.
2218 2246
2219 2247 See 'hg help urls' for more information.
2220 2248 """
@@ -2247,18 +2275,18 b' def pull(ui, repo, source="default", **o'
2247 2275
2248 2276 Pull changes from a remote repository to a local one.
2249 2277
2250 This finds all changes from the repository at the specified path or URL
2251 and adds them to a local repository (the current one unless -R is
2252 specified). By default, this does not update the copy of the project in
2253 the working directory.
2254
2255 Use hg incoming if you want to see what would have been added by a pull at
2256 the time you issued this command. If you then decide to added those
2257 changes to the repository, you should use pull -r X where X is the last
2258 changeset listed by hg incoming.
2259
2260 If SOURCE is omitted, the 'default' path will be used. See 'hg help urls'
2261 for more information.
2278 This finds all changes from the repository at the specified path
2279 or URL and adds them to a local repository (the current one unless
2280 -R is specified). By default, this does not update the copy of the
2281 project in the working directory.
2282
2283 Use hg incoming if you want to see what would have been added by a
2284 pull at the time you issued this command. If you then decide to
2285 added those changes to the repository, you should use pull -r X
2286 where X is the last changeset listed by hg incoming.
2287
2288 If SOURCE is omitted, the 'default' path will be used.
2289 See 'hg help urls' for more information.
2262 2290 """
2263 2291 source, revs, checkout = hg.parseurl(ui.expandpath(source), opts.get('rev'))
2264 2292 other = hg.repository(cmdutil.remoteui(repo, opts), source)
@@ -2279,19 +2307,20 b' def push(ui, repo, dest=None, **opts):'
2279 2307
2280 2308 Push changes from the local repository to the given destination.
2281 2309
2282 This is the symmetrical operation for pull. It moves changes from the
2283 current repository to a different one. If the destination is local this is
2284 identical to a pull in that directory from the current one.
2310 This is the symmetrical operation for pull. It moves changes from
2311 the current repository to a different one. If the destination is
2312 local this is identical to a pull in that directory from the
2313 current one.
2285 2314
2286 2315 By default, push will refuse to run if it detects the result would
2287 increase the number of remote heads. This generally indicates the user
2288 forgot to pull and merge before pushing.
2289
2290 If -r/--rev is used, the named revision and all its ancestors will be
2291 pushed to the remote repository.
2292
2293 Please see 'hg help urls' for important details about ssh:// URLs. If
2294 DESTINATION is omitted, a default path will be used.
2316 increase the number of remote heads. This generally indicates the
2317 user forgot to pull and merge before pushing.
2318
2319 If -r/--rev is used, the named revision and all its ancestors will
2320 be pushed to the remote repository.
2321
2322 Please see 'hg help urls' for important details about ssh://
2323 URLs. If DESTINATION is omitted, a default path will be used.
2295 2324 """
2296 2325 dest, revs, checkout = hg.parseurl(
2297 2326 ui.expandpath(dest or 'default-push', dest or 'default'), opts.get('rev'))
@@ -2314,8 +2343,9 b' def recover(ui, repo):'
2314 2343
2315 2344 Recover from an interrupted commit or pull.
2316 2345
2317 This command tries to fix the repository status after an interrupted
2318 operation. It should only be necessary when Mercurial suggests it.
2346 This command tries to fix the repository status after an
2347 interrupted operation. It should only be necessary when Mercurial
2348 suggests it.
2319 2349 """
2320 2350 if repo.recover():
2321 2351 return hg.verify(repo)
@@ -2326,16 +2356,17 b' def remove(ui, repo, *pats, **opts):'
2326 2356
2327 2357 Schedule the indicated files for removal from the repository.
2328 2358
2329 This only removes files from the current branch, not from the entire
2330 project history. -A/--after can be used to remove only files that have
2331 already been deleted, -f/--force can be used to force deletion, and -Af
2332 can be used to remove files from the next revision without deleting them
2333 from the working directory.
2334
2335 The following table details the behavior of remove for different file
2336 states (columns) and option combinations (rows). The file states are Added
2337 [A], Clean [C], Modified [M] and Missing [!] (as reported by hg status).
2338 The actions are Warn, Remove (from branch) and Delete (from disk)::
2359 This only removes files from the current branch, not from the
2360 entire project history. -A/--after can be used to remove only
2361 files that have already been deleted, -f/--force can be used to
2362 force deletion, and -Af can be used to remove files from the next
2363 revision without deleting them from the working directory.
2364
2365 The following table details the behavior of remove for different
2366 file states (columns) and option combinations (rows). The file
2367 states are Added [A], Clean [C], Modified [M] and Missing [!] (as
2368 reported by hg status). The actions are Warn, Remove (from branch)
2369 and Delete (from disk)::
2339 2370
2340 2371 A C M !
2341 2372 none W RD W R
@@ -2343,8 +2374,8 b' def remove(ui, repo, *pats, **opts):'
2343 2374 -A W W W R
2344 2375 -Af R R R R
2345 2376
2346 This command schedules the files to be removed at the next commit. To undo
2347 a remove before that, see hg revert.
2377 This command schedules the files to be removed at the next commit.
2378 To undo a remove before that, see hg revert.
2348 2379 """
2349 2380
2350 2381 after, force = opts.get('after'), opts.get('force')
@@ -2384,16 +2415,16 b' def remove(ui, repo, *pats, **opts):'
2384 2415 def rename(ui, repo, *pats, **opts):
2385 2416 """rename files; equivalent of copy + remove
2386 2417
2387 Mark dest as copies of sources; mark sources for deletion. If dest is a
2388 directory, copies are put in that directory. If dest is a file, there can
2389 only be one source.
2390
2391 By default, this command copies the contents of files as they exist in the
2392 working directory. If invoked with -A/--after, the operation is recorded,
2393 but no copying is performed.
2394
2395 This command takes effect at the next commit. To undo a rename before
2396 that, see hg revert.
2418 Mark dest as copies of sources; mark sources for deletion. If dest
2419 is a directory, copies are put in that directory. If dest is a
2420 file, there can only be one source.
2421
2422 By default, this command copies the contents of files as they
2423 exist in the working directory. If invoked with -A/--after, the
2424 operation is recorded, but no copying is performed.
2425
2426 This command takes effect at the next commit. To undo a rename
2427 before that, see hg revert.
2397 2428 """
2398 2429 wlock = repo.wlock(False)
2399 2430 try:
@@ -2405,16 +2436,16 b' def resolve(ui, repo, *pats, **opts):'
2405 2436 """retry file merges from a merge or update
2406 2437
2407 2438 This command will cleanly retry unresolved file merges using file
2408 revisions preserved from the last update or merge. To attempt to resolve
2409 all unresolved files, use the -a/--all switch.
2410
2411 If a conflict is resolved manually, please note that the changes will be
2412 overwritten if the merge is retried with resolve. The -m/--mark switch
2413 should be used to mark the file as resolved.
2414
2415 This command also allows listing resolved files and manually indicating
2416 whether or not files are resolved. All files must be marked as resolved
2417 before a commit is permitted.
2439 revisions preserved from the last update or merge. To attempt to
2440 resolve all unresolved files, use the -a/--all switch.
2441
2442 If a conflict is resolved manually, please note that the changes
2443 will be overwritten if the merge is retried with resolve. The
2444 -m/--mark switch should be used to mark the file as resolved.
2445
2446 This command also allows listing resolved files and manually
2447 indicating whether or not files are resolved. All files must be
2448 marked as resolved before a commit is permitted.
2418 2449
2419 2450 The codes used to show the status of files are::
2420 2451
@@ -2460,33 +2491,35 b' def resolve(ui, repo, *pats, **opts):'
2460 2491 def revert(ui, repo, *pats, **opts):
2461 2492 """restore individual files or directories to an earlier state
2462 2493
2463 (Use update -r to check out earlier revisions, revert does not change the
2464 working directory parents.)
2465
2466 With no revision specified, revert the named files or directories to the
2467 contents they had in the parent of the working directory. This restores
2468 the contents of the affected files to an unmodified state and unschedules
2469 adds, removes, copies, and renames. If the working directory has two
2470 parents, you must explicitly specify the revision to revert to.
2471
2472 Using the -r/--rev option, revert the given files or directories to their
2473 contents as of a specific revision. This can be helpful to "roll back"
2474 some or all of an earlier change. See 'hg help dates' for a list of
2475 formats valid for -d/--date.
2476
2477 Revert modifies the working directory. It does not commit any changes, or
2478 change the parent of the working directory. If you revert to a revision
2479 other than the parent of the working directory, the reverted files will
2480 thus appear modified afterwards.
2481
2482 If a file has been deleted, it is restored. If the executable mode of a
2483 file was changed, it is reset.
2484
2485 If names are given, all files matching the names are reverted. If no
2486 arguments are given, no files are reverted.
2487
2488 Modified files are saved with a .orig suffix before reverting. To disable
2489 these backups, use --no-backup.
2494 (Use update -r to check out earlier revisions, revert does not
2495 change the working directory parents.)
2496
2497 With no revision specified, revert the named files or directories
2498 to the contents they had in the parent of the working directory.
2499 This restores the contents of the affected files to an unmodified
2500 state and unschedules adds, removes, copies, and renames. If the
2501 working directory has two parents, you must explicitly specify the
2502 revision to revert to.
2503
2504 Using the -r/--rev option, revert the given files or directories
2505 to their contents as of a specific revision. This can be helpful
2506 to "roll back" some or all of an earlier change. See 'hg help
2507 dates' for a list of formats valid for -d/--date.
2508
2509 Revert modifies the working directory. It does not commit any
2510 changes, or change the parent of the working directory. If you
2511 revert to a revision other than the parent of the working
2512 directory, the reverted files will thus appear modified
2513 afterwards.
2514
2515 If a file has been deleted, it is restored. If the executable mode
2516 of a file was changed, it is reset.
2517
2518 If names are given, all files matching the names are reverted.
2519 If no arguments are given, no files are reverted.
2520
2521 Modified files are saved with a .orig suffix before reverting.
2522 To disable these backups, use --no-backup.
2490 2523 """
2491 2524
2492 2525 if opts["date"]:
@@ -2675,14 +2708,15 b' def rollback(ui, repo):'
2675 2708 """roll back the last transaction
2676 2709
2677 2710 This command should be used with care. There is only one level of
2678 rollback, and there is no way to undo a rollback. It will also restore the
2679 dirstate at the time of the last transaction, losing any dirstate changes
2680 since that time. This command does not alter the working directory.
2681
2682 Transactions are used to encapsulate the effects of all commands that
2683 create new changesets or propagate existing changesets into a repository.
2684 For example, the following commands are transactional, and their effects
2685 can be rolled back::
2711 rollback, and there is no way to undo a rollback. It will also
2712 restore the dirstate at the time of the last transaction, losing
2713 any dirstate changes since that time. This command does not alter
2714 the working directory.
2715
2716 Transactions are used to encapsulate the effects of all commands
2717 that create new changesets or propagate existing changesets into a
2718 repository. For example, the following commands are transactional,
2719 and their effects can be rolled back::
2686 2720
2687 2721 commit
2688 2722 import
@@ -2690,12 +2724,12 b' def rollback(ui, repo):'
2690 2724 push (with this repository as destination)
2691 2725 unbundle
2692 2726
2693 This command is not intended for use on public repositories. Once changes
2694 are visible for pull by other users, rolling a transaction back locally is
2695 ineffective (someone else may already have pulled the changes).
2696 Furthermore, a race is possible with readers of the repository; for
2697 example an in-progress pull from the repository may fail if a rollback is
2698 performed.
2727 This command is not intended for use on public repositories. Once
2728 changes are visible for pull by other users, rolling a transaction
2729 back locally is ineffective (someone else may already have pulled
2730 the changes). Furthermore, a race is possible with readers of the
2731 repository; for example an in-progress pull from the repository
2732 may fail if a rollback is performed.
2699 2733 """
2700 2734 repo.rollback()
2701 2735
@@ -2711,8 +2745,9 b' def serve(ui, repo, **opts):'
2711 2745
2712 2746 Start a local HTTP repository browser and pull server.
2713 2747
2714 By default, the server logs accesses to stdout and errors to stderr. Use
2715 the -A/--accesslog and -E/--errorlog options to log to files.
2748 By default, the server logs accesses to stdout and errors to
2749 stderr. Use the -A/--accesslog and -E/--errorlog options to log to
2750 files.
2716 2751 """
2717 2752
2718 2753 if opts["stdio"]:
@@ -2773,22 +2808,24 b' def serve(ui, repo, **opts):'
2773 2808 def status(ui, repo, *pats, **opts):
2774 2809 """show changed files in the working directory
2775 2810
2776 Show status of files in the repository. If names are given, only files
2777 that match are shown. Files that are clean or ignored or the source of a
2778 copy/move operation, are not listed unless -c/--clean, -i/--ignored,
2779 -C/--copies or -A/--all are given. Unless options described with "show
2780 only ..." are given, the options -mardu are used.
2781
2782 Option -q/--quiet hides untracked (unknown and ignored) files unless
2783 explicitly requested with -u/--unknown or -i/--ignored.
2784
2785 NOTE: status may appear to disagree with diff if permissions have changed
2786 or a merge has occurred. The standard diff format does not report
2787 permission changes and diff only reports changes relative to one merge
2788 parent.
2789
2790 If one revision is given, it is used as the base revision. If two
2791 revisions are given, the differences between them are shown.
2811 Show status of files in the repository. If names are given, only
2812 files that match are shown. Files that are clean or ignored or
2813 the source of a copy/move operation, are not listed unless
2814 -c/--clean, -i/--ignored, -C/--copies or -A/--all are given.
2815 Unless options described with "show only ..." are given, the
2816 options -mardu are used.
2817
2818 Option -q/--quiet hides untracked (unknown and ignored) files
2819 unless explicitly requested with -u/--unknown or -i/--ignored.
2820
2821 NOTE: status may appear to disagree with diff if permissions have
2822 changed or a merge has occurred. The standard diff format does not
2823 report permission changes and diff only reports changes relative
2824 to one merge parent.
2825
2826 If one revision is given, it is used as the base revision.
2827 If two revisions are given, the differences between them are
2828 shown.
2792 2829
2793 2830 The codes used to show the status of files are::
2794 2831
@@ -2847,17 +2884,18 b' def tag(ui, repo, name1, *names, **opts)'
2847 2884
2848 2885 Name a particular revision using <name>.
2849 2886
2850 Tags are used to name particular revisions of the repository and are very
2851 useful to compare different revisions, to go back to significant earlier
2852 versions or to mark branch points as releases, etc.
2853
2854 If no revision is given, the parent of the working directory is used, or
2855 tip if no revision is checked out.
2856
2857 To facilitate version control, distribution, and merging of tags, they are
2858 stored as a file named ".hgtags" which is managed similarly to other
2859 project files and can be hand-edited if necessary. The file
2860 '.hg/localtags' is used for local tags (not shared among repositories).
2887 Tags are used to name particular revisions of the repository and are
2888 very useful to compare different revisions, to go back to significant
2889 earlier versions or to mark branch points as releases, etc.
2890
2891 If no revision is given, the parent of the working directory is
2892 used, or tip if no revision is checked out.
2893
2894 To facilitate version control, distribution, and merging of tags,
2895 they are stored as a file named ".hgtags" which is managed
2896 similarly to other project files and can be hand-edited if
2897 necessary. The file '.hg/localtags' is used for local tags (not
2898 shared among repositories).
2861 2899
2862 2900 See 'hg help dates' for a list of formats valid for -d/--date.
2863 2901 """
@@ -2912,8 +2950,8 b' def tag(ui, repo, name1, *names, **opts)'
2912 2950 def tags(ui, repo):
2913 2951 """list repository tags
2914 2952
2915 This lists both regular and local tags. When the -v/--verbose switch is
2916 used, a third column "local" is printed for local tags.
2953 This lists both regular and local tags. When the -v/--verbose
2954 switch is used, a third column "local" is printed for local tags.
2917 2955 """
2918 2956
2919 2957 hexfunc = ui.debugflag and hex or short
@@ -2941,22 +2979,22 b' def tags(ui, repo):'
2941 2979 def tip(ui, repo, **opts):
2942 2980 """show the tip revision
2943 2981
2944 The tip revision (usually just called the tip) is the changeset most
2945 recently added to the repository (and therefore the most recently changed
2946 head).
2947
2948 If you have just made a commit, that commit will be the tip. If you have
2949 just pulled changes from another repository, the tip of that repository
2950 becomes the current tip. The "tip" tag is special and cannot be renamed or
2951 assigned to a different changeset.
2982 The tip revision (usually just called the tip) is the changeset
2983 most recently added to the repository (and therefore the most
2984 recently changed head).
2985
2986 If you have just made a commit, that commit will be the tip. If
2987 you have just pulled changes from another repository, the tip of
2988 that repository becomes the current tip. The "tip" tag is special
2989 and cannot be renamed or assigned to a different changeset.
2952 2990 """
2953 2991 cmdutil.show_changeset(ui, repo, opts).show(repo[len(repo) - 1])
2954 2992
2955 2993 def unbundle(ui, repo, fname1, *fnames, **opts):
2956 2994 """apply one or more changegroup files
2957 2995
2958 Apply one or more compressed changegroup files generated by the bundle
2959 command.
2996 Apply one or more compressed changegroup files generated by the
2997 bundle command.
2960 2998 """
2961 2999 fnames = (fname1,) + fnames
2962 3000
@@ -2974,27 +3012,31 b' def unbundle(ui, repo, fname1, *fnames, '
2974 3012 def update(ui, repo, node=None, rev=None, clean=False, date=None, check=False):
2975 3013 """update working directory
2976 3014
2977 Update the repository's working directory to the specified revision, or
2978 the tip of the current branch if none is specified. Use null as the
2979 revision to remove the working copy (like 'hg clone -U').
2980
2981 When the working directory contains no uncommitted changes, it will be
2982 replaced by the state of the requested revision from the repository. When
2983 the requested revision is on a different branch, the working directory
2984 will additionally be switched to that branch.
2985
2986 When there are uncommitted changes, use option -C/--clean to discard them,
2987 forcibly replacing the state of the working directory with the requested
2988 revision. Alternately, use -c/--check to abort.
2989
2990 When there are uncommitted changes and option -C/--clean is not used, and
2991 the parent revision and requested revision are on the same branch, and one
2992 of them is an ancestor of the other, then the new working directory will
2993 contain the requested revision merged with the uncommitted changes.
2994 Otherwise, the update will fail with a suggestion to use 'merge' or
2995 'update -C' instead.
2996
2997 If you want to update just one file to an older revision, use revert.
3015 Update the repository's working directory to the specified
3016 revision, or the tip of the current branch if none is specified.
3017 Use null as the revision to remove the working copy (like 'hg
3018 clone -U').
3019
3020 When the working directory contains no uncommitted changes, it
3021 will be replaced by the state of the requested revision from the
3022 repository. When the requested revision is on a different branch,
3023 the working directory will additionally be switched to that
3024 branch.
3025
3026 When there are uncommitted changes, use option -C/--clean to
3027 discard them, forcibly replacing the state of the working
3028 directory with the requested revision. Alternately, use -c/--check
3029 to abort.
3030
3031 When there are uncommitted changes and option -C/--clean is not
3032 used, and the parent revision and requested revision are on the
3033 same branch, and one of them is an ancestor of the other, then the
3034 new working directory will contain the requested revision merged
3035 with the uncommitted changes. Otherwise, the update will fail with
3036 a suggestion to use 'merge' or 'update -C' instead.
3037
3038 If you want to update just one file to an older revision, use
3039 revert.
2998 3040
2999 3041 See 'hg help dates' for a list of formats valid for -d/--date.
3000 3042 """
@@ -3025,10 +3067,10 b' def verify(ui, repo):'
3025 3067
3026 3068 Verify the integrity of the current repository.
3027 3069
3028 This will perform an extensive check of the repository's integrity,
3029 validating the hashes and checksums of each entry in the changelog,
3030 manifest, and tracked files, as well as the integrity of their crosslinks
3031 and indices.
3070 This will perform an extensive check of the repository's
3071 integrity, validating the hashes and checksums of each entry in
3072 the changelog, manifest, and tracked files, as well as the
3073 integrity of their crosslinks and indices.
3032 3074 """
3033 3075 return hg.verify(repo)
3034 3076
General Comments 0
You need to be logged in to leave comments. Login now