##// END OF EJS Templates
commands: consistently write switches as -a/--abc
Martin Geisler -
r8033:aeb4a5c7 default
parent child Browse files
Show More
@@ -56,11 +56,12 b' def addremove(ui, repo, *pats, **opts):'
56 .hgignore. As with add, these changes take effect at the next
56 .hgignore. As with add, these changes take effect at the next
57 commit.
57 commit.
58
58
59 Use the -s option to detect renamed files. With a parameter > 0,
59 Use the -s/--similarity option to detect renamed files. With a
60 this compares every removed file with every added file and records
60 parameter > 0, this compares every removed file with every added
61 those similar enough as renames. This option takes a percentage
61 file and records those similar enough as renames. This option
62 between 0 (disabled) and 100 (files must be identical) as its
62 takes a percentage between 0 (disabled) and 100 (files must be
63 parameter. Detecting renamed files this way can be expensive.
63 identical) as its parameter. Detecting renamed files this way can
64 be expensive.
64 """
65 """
65 try:
66 try:
66 sim = float(opts.get('similarity') or 0)
67 sim = float(opts.get('similarity') or 0)
@@ -79,9 +80,9 b' def annotate(ui, repo, *pats, **opts):'
79 This command is useful to discover who did a change or when a
80 This command is useful to discover who did a change or when a
80 change took place.
81 change took place.
81
82
82 Without the -a option, annotate will avoid processing files it
83 Without the -a/--text option, annotate will avoid processing files
83 detects as binary. With -a, annotate will generate an annotation
84 it detects as binary. With -a, annotate will generate an
84 anyway, probably with undesirable results.
85 annotation anyway, probably with undesirable results.
85 """
86 """
86 datefunc = ui.quiet and util.shortdate or util.datestr
87 datefunc = ui.quiet and util.shortdate or util.datestr
87 getdate = util.cachefunc(lambda x: datefunc(x[0].date()))
88 getdate = util.cachefunc(lambda x: datefunc(x[0].date()))
@@ -136,9 +137,10 b' def archive(ui, repo, dest, **opts):'
136 '''create unversioned archive of a repository revision
137 '''create unversioned archive of a repository revision
137
138
138 By default, the revision used is the parent of the working
139 By default, the revision used is the parent of the working
139 directory; use -r to specify a different revision.
140 directory; use -r/--rev to specify a different revision.
140
141
141 To specify the type of archive to create, use -t. Valid types are:
142 To specify the type of archive to create, use -t/--type. Valid
143 types are:
142
144
143 "files" (default): a directory full of files
145 "files" (default): a directory full of files
144 "tar": tar archive, uncompressed
146 "tar": tar archive, uncompressed
@@ -151,8 +153,9 b' def archive(ui, repo, dest, **opts):'
151 using a format string; see 'hg help export' for details.
153 using a format string; see 'hg help export' for details.
152
154
153 Each member added to an archive file has a directory prefix
155 Each member added to an archive file has a directory prefix
154 prepended. Use -p to specify a format string for the prefix. The
156 prepended. Use -p/--prefix to specify a format string for the
155 default is the basename of the archive, with suffixes removed.
157 prefix. The default is the basename of the archive, with suffixes
158 removed.
156 '''
159 '''
157
160
158 ctx = repo[opts.get('rev')]
161 ctx = repo[opts.get('rev')]
@@ -268,10 +271,10 b' def bisect(ui, repo, rev=None, extra=Non'
268 use, mark the earliest changeset you know exhibits the problem as
271 use, mark the earliest changeset you know exhibits the problem as
269 bad, then mark the latest changeset which is free from the problem
272 bad, then mark the latest changeset which is free from the problem
270 as good. Bisect will update your working directory to a revision
273 as good. Bisect will update your working directory to a revision
271 for testing (unless the --noupdate option is specified). Once you
274 for testing (unless the -U/--noupdate option is specified). Once
272 have performed tests, mark the working directory as bad or good
275 you have performed tests, mark the working directory as bad or
273 and bisect will either update to another candidate changeset or
276 good and bisect will either update to another candidate changeset
274 announce that it has found the bad revision.
277 or announce that it has found the bad revision.
275
278
276 As a shortcut, you can also use the revision argument to mark a
279 As a shortcut, you can also use the revision argument to mark a
277 revision as good or bad without checking it out first.
280 revision as good or bad without checking it out first.
@@ -399,11 +402,11 b' def branch(ui, repo, label=None, **opts)'
399 in the repository until the next commit). It is recommended to use
402 in the repository until the next commit). It is recommended to use
400 the 'default' branch as your primary development branch.
403 the 'default' branch as your primary development branch.
401
404
402 Unless --force is specified, branch will not let you set a branch
405 Unless -f/--force is specified, branch will not let you set a
403 name that shadows an existing branch.
406 branch name that shadows an existing branch.
404
407
405 Use --clean to reset the working directory branch to that of the
408 Use -C/--clean to reset the working directory branch to that of
406 parent of the working directory, negating a previous branch
409 the parent of the working directory, negating a previous branch
407 change.
410 change.
408
411
409 Use the command 'hg update' to switch to an existing branch.
412 Use the command 'hg update' to switch to an existing branch.
@@ -465,8 +468,9 b' def bundle(ui, repo, fname, dest=None, *'
465 If no destination repository is specified the destination is
468 If no destination repository is specified the destination is
466 assumed to have all the nodes specified by one or more --base
469 assumed to have all the nodes specified by one or more --base
467 parameters. To create a bundle containing all changesets, use
470 parameters. To create a bundle containing all changesets, use
468 --all (or --base null). To change the compression method applied,
471 -a/--all (or --base null). To change the compression method
469 use the -t option (by default, bundles are compressed using bz2).
472 applied, use the -t/--type option (by default, bundles are
473 compressed using bz2).
470
474
471 The bundle file can then be transferred using conventional means
475 The bundle file can then be transferred using conventional means
472 and applied to another repository with the unbundle or pull
476 and applied to another repository with the unbundle or pull
@@ -567,15 +571,15 b' def clone(ui, source, dest=None, **opts)'
567 The location of the source is added to the new repository's
571 The location of the source is added to the new repository's
568 .hg/hgrc file, as the default to be used for future pulls.
572 .hg/hgrc file, as the default to be used for future pulls.
569
573
570 If you use the -r option to clone up to a specific revision, no
574 If you use the -r/--rev option to clone up to a specific revision,
571 subsequent revisions (including subsequent tags) will be present
575 no subsequent revisions (including subsequent tags) will be
572 in the cloned repository. This option implies --pull, even on
576 present in the cloned repository. This option implies --pull, even
573 local repositories.
577 on local repositories.
574
578
575 By default, clone will check out the head of the 'default' branch.
579 By default, clone will check out the head of the 'default' branch.
576 If the -U option is used, the new clone will contain only a
580 If the -U/--noupdate option is used, the new clone will contain
577 repository (.hg) and no working copy (the working copy parent is
581 only a repository (.hg) and no working copy (the working copy
578 the null revision).
582 parent is the null revision).
579
583
580 See 'hg help urls' for valid source format details.
584 See 'hg help urls' for valid source format details.
581
585
@@ -664,7 +668,7 b' def copy(ui, repo, *pats, **opts):'
664 the source must be a single file.
668 the source must be a single file.
665
669
666 By default, this command copies the contents of files as they
670 By default, this command copies the contents of files as they
667 stand in the working directory. If invoked with --after, the
671 stand in the working directory. If invoked with -A/--after, the
668 operation is recorded, but no copying is performed.
672 operation is recorded, but no copying is performed.
669
673
670 This command takes effect with the next commit. To undo a copy
674 This command takes effect with the next commit. To undo a copy
@@ -1032,11 +1036,11 b' def diff(ui, repo, *pats, **opts):'
1032 revisions are specified, the working directory files are compared
1036 revisions are specified, the working directory files are compared
1033 to its parent.
1037 to its parent.
1034
1038
1035 Without the -a option, diff will avoid generating diffs of files
1039 Without the -a/--text option, diff will avoid generating diffs of
1036 it detects as binary. With -a, diff will generate a diff anyway,
1040 files it detects as binary. With -a, diff will generate a diff
1037 probably with undesirable results.
1041 anyway, probably with undesirable results.
1038
1042
1039 Use the --git option to generate diffs in the git extended diff
1043 Use the -g/--git option to generate diffs in the git extended diff
1040 format. For more information, read 'hg help diffs'.
1044 format. For more information, read 'hg help diffs'.
1041 """
1045 """
1042
1046
@@ -1081,11 +1085,11 b' def export(ui, repo, *changesets, **opts'
1081 %n zero-padded sequence number, starting at 1
1085 %n zero-padded sequence number, starting at 1
1082 %r zero-padded changeset revision number
1086 %r zero-padded changeset revision number
1083
1087
1084 Without the -a option, export will avoid generating diffs of files
1088 Without the -a/--text option, export will avoid generating diffs
1085 it detects as binary. With -a, export will generate a diff anyway,
1089 of files it detects as binary. With -a, export will generate a
1086 probably with undesirable results.
1090 diff anyway, probably with undesirable results.
1087
1091
1088 Use the --git option to generate diffs in the git extended diff
1092 Use the -g/--git option to generate diffs in the git extended diff
1089 format. Read the diffs help topic for more information.
1093 format. Read the diffs help topic for more information.
1090
1094
1091 With the --switch-parent option, the diff will be against the
1095 With the --switch-parent option, the diff will be against the
@@ -1612,7 +1616,7 b' def import_(ui, repo, patch1, *patches, '
1612 Import a list of patches and commit them individually.
1616 Import a list of patches and commit them individually.
1613
1617
1614 If there are outstanding changes in the working directory, import
1618 If there are outstanding changes in the working directory, import
1615 will abort unless given the -f flag.
1619 will abort unless given the -f/--force flag.
1616
1620
1617 You can import a patch straight from a mail message. Even patches
1621 You can import a patch straight from a mail message. Even patches
1618 as attachments work (body part must be type text/plain or
1622 as attachments work (body part must be type text/plain or
@@ -1623,7 +1627,8 b' def import_(ui, repo, patch1, *patches, '
1623
1627
1624 If the imported patch was generated by hg export, user and
1628 If the imported patch was generated by hg export, user and
1625 description from patch override values from message headers and
1629 description from patch override values from message headers and
1626 body. Values given on command line with -m and -u override these.
1630 body. Values given on command line with -m/--message and -u/--user
1631 override these.
1627
1632
1628 If --exact is specified, import will set the working directory to
1633 If --exact is specified, import will set the working directory to
1629 the parent of each patch before applying it, and will abort if the
1634 the parent of each patch before applying it, and will abort if the
@@ -1631,8 +1636,8 b' def import_(ui, repo, patch1, *patches, '
1631 the patch. This may happen due to character set problems or other
1636 the patch. This may happen due to character set problems or other
1632 deficiencies in the text patch format.
1637 deficiencies in the text patch format.
1633
1638
1634 With --similarity, hg will attempt to discover renames and copies
1639 With -s/--similarity, hg will attempt to discover renames and
1635 in the patch in the same way as 'addremove'.
1640 copies in the patch in the same way as 'addremove'.
1636
1641
1637 To read a patch from standard input, use patch name "-". See 'hg
1642 To read a patch from standard input, use patch name "-". See 'hg
1638 help dates' for a list of formats valid for -d/--date.
1643 help dates' for a list of formats valid for -d/--date.
@@ -1873,7 +1878,7 b' def log(ui, repo, *pats, **opts):'
1873 commit. When the -v/--verbose switch is used, the list of changed
1878 commit. When the -v/--verbose switch is used, the list of changed
1874 files and full commit message is shown.
1879 files and full commit message is shown.
1875
1880
1876 NOTE: log -p may generate unexpected diff output for merge
1881 NOTE: log -p/--patch may generate unexpected diff output for merge
1877 changesets, as it will only compare the merge changeset against
1882 changesets, as it will only compare the merge changeset against
1878 its first parent. Also, the files: list will only reflect files
1883 its first parent. Also, the files: list will only reflect files
1879 that are different from BOTH parents.
1884 that are different from BOTH parents.
@@ -2090,8 +2095,8 b' def parents(ui, repo, file_=None, **opts'
2090 """show the parents of the working directory or revision
2095 """show the parents of the working directory or revision
2091
2096
2092 Print the working directory's parent revisions. If a revision is
2097 Print the working directory's parent revisions. If a revision is
2093 given via --rev, the parent of that revision will be printed. If a
2098 given via -r/--rev, the parent of that revision will be printed.
2094 file argument is given, revision in which the file was last
2099 If a file argument is given, revision in which the file was last
2095 changed (before the working directory revision or the argument to
2100 changed (before the working directory revision or the argument to
2096 --rev if given) is printed.
2101 --rev if given) is printed.
2097 """
2102 """
@@ -2206,8 +2211,8 b' def push(ui, repo, dest=None, **opts):'
2206 increase the number of remote heads. This generally indicates the
2211 increase the number of remote heads. This generally indicates the
2207 the client has forgotten to pull and merge before pushing.
2212 the client has forgotten to pull and merge before pushing.
2208
2213
2209 If -r is used, the named revision and all its ancestors will be
2214 If -r/--rev is used, the named revision and all its ancestors will
2210 pushed to the remote repository.
2215 be pushed to the remote repository.
2211
2216
2212 Look at the help text for URLs for important details about ssh://
2217 Look at the help text for URLs for important details about ssh://
2213 URLs. If DESTINATION is omitted, a default path will be used.
2218 URLs. If DESTINATION is omitted, a default path will be used.
@@ -2271,10 +2276,10 b' def remove(ui, repo, *pats, **opts):'
2271 Schedule the indicated files for removal from the repository.
2276 Schedule the indicated files for removal from the repository.
2272
2277
2273 This only removes files from the current branch, not from the
2278 This only removes files from the current branch, not from the
2274 entire project history. -A can be used to remove only files that
2279 entire project history. -A/--after can be used to remove only
2275 have already been deleted, -f can be used to force deletion, and
2280 files that have already been deleted, -f/--force can be used to
2276 -Af can be used to remove files from the next revision without
2281 force deletion, and -Af can be used to remove files from the next
2277 deleting them.
2282 revision without deleting them.
2278
2283
2279 The following table details the behavior of remove for different
2284 The following table details the behavior of remove for different
2280 file states (columns) and option combinations (rows). The file
2285 file states (columns) and option combinations (rows). The file
@@ -2330,7 +2335,7 b' def rename(ui, repo, *pats, **opts):'
2330 file, there can only be one source.
2335 file, there can only be one source.
2331
2336
2332 By default, this command copies the contents of files as they
2337 By default, this command copies the contents of files as they
2333 exist in the working directory. If invoked with --after, the
2338 exist in the working directory. If invoked with -A/--after, the
2334 operation is recorded, but no copying is performed.
2339 operation is recorded, but no copying is performed.
2335
2340
2336 This command takes effect at the next commit. To undo a rename
2341 This command takes effect at the next commit. To undo a rename
@@ -2347,11 +2352,11 b' def resolve(ui, repo, *pats, **opts):'
2347
2352
2348 This command will cleanly retry unresolved file merges using file
2353 This command will cleanly retry unresolved file merges using file
2349 revisions preserved from the last update or merge. To attempt to
2354 revisions preserved from the last update or merge. To attempt to
2350 resolve all unresolved files, use the -a switch.
2355 resolve all unresolved files, use the -a/--all switch.
2351
2356
2352 If a conflict is resolved manually, please note that the changes
2357 If a conflict is resolved manually, please note that the changes
2353 will be overwritten if the merge is retried with resolve. The -m
2358 will be overwritten if the merge is retried with resolve. The
2354 switch should be used to mark the file as resolved.
2359 -m/--mark switch should be used to mark the file as resolved.
2355
2360
2356 This command will also allow listing resolved files and manually
2361 This command will also allow listing resolved files and manually
2357 marking and unmarking files as resolved. All files must be marked
2362 marking and unmarking files as resolved. All files must be marked
@@ -2410,10 +2415,10 b' def revert(ui, repo, *pats, **opts):'
2410 working directory has two parents, you must explicitly specify the
2415 working directory has two parents, you must explicitly specify the
2411 revision to revert to.
2416 revision to revert to.
2412
2417
2413 Using the -r option, revert the given files or directories to
2418 Using the -r/--rev option, revert the given files or directories
2414 their contents as of a specific revision. This can be helpful to
2419 to their contents as of a specific revision. This can be helpful
2415 "roll back" some or all of an earlier change. See 'hg help dates'
2420 to "roll back" some or all of an earlier change. See 'hg help
2416 for a list of formats valid for -d/--date.
2421 dates' for a list of formats valid for -d/--date.
2417
2422
2418 Revert modifies the working directory. It does not commit any
2423 Revert modifies the working directory. It does not commit any
2419 changes, or change the parent of the working directory. If you
2424 changes, or change the parent of the working directory. If you
@@ -2718,9 +2723,10 b' def status(ui, repo, *pats, **opts):'
2718
2723
2719 Show status of files in the repository. If names are given, only
2724 Show status of files in the repository. If names are given, only
2720 files that match are shown. Files that are clean or ignored or
2725 files that match are shown. Files that are clean or ignored or
2721 source of a copy/move operation, are not listed unless -c (clean),
2726 source of a copy/move operation, are not listed unless -c/--clean,
2722 -i (ignored), -C (copies) or -A is given. Unless options described
2727 -i/--ignored, -C/--copies or -A/--all is given. Unless options
2723 with "show only ..." are given, the options -mardu are used.
2728 described with "show only ..." are given, the options -mardu are
2729 used.
2724
2730
2725 Option -q/--quiet hides untracked (unknown and ignored) files
2731 Option -q/--quiet hides untracked (unknown and ignored) files
2726 unless explicitly requested with -u/--unknown or -i/--ignored.
2732 unless explicitly requested with -u/--unknown or -i/--ignored.
@@ -2943,7 +2949,7 b' def update(ui, repo, node=None, rev=None'
2943 If you want to update just one file to an older revision, use
2949 If you want to update just one file to an older revision, use
2944 revert.
2950 revert.
2945
2951
2946 See 'hg help dates' for a list of formats valid for --date.
2952 See 'hg help dates' for a list of formats valid for -d/--date.
2947 """
2953 """
2948 if rev and node:
2954 if rev and node:
2949 raise util.Abort(_("please specify just one revision"))
2955 raise util.Abort(_("please specify just one revision"))
@@ -217,11 +217,11 b' diff repository (or selected files)'
217 revisions are specified, the working directory files are compared
217 revisions are specified, the working directory files are compared
218 to its parent.
218 to its parent.
219
219
220 Without the -a option, diff will avoid generating diffs of files
220 Without the -a/--text option, diff will avoid generating diffs of
221 it detects as binary. With -a, diff will generate a diff anyway,
221 files it detects as binary. With -a, diff will generate a diff
222 probably with undesirable results.
222 anyway, probably with undesirable results.
223
223
224 Use the --git option to generate diffs in the git extended diff
224 Use the -g/--git option to generate diffs in the git extended diff
225 format. For more information, read 'hg help diffs'.
225 format. For more information, read 'hg help diffs'.
226
226
227 options:
227 options:
@@ -248,9 +248,10 b' show changed files in the working direct'
248
248
249 Show status of files in the repository. If names are given, only
249 Show status of files in the repository. If names are given, only
250 files that match are shown. Files that are clean or ignored or
250 files that match are shown. Files that are clean or ignored or
251 source of a copy/move operation, are not listed unless -c (clean),
251 source of a copy/move operation, are not listed unless -c/--clean,
252 -i (ignored), -C (copies) or -A is given. Unless options described
252 -i/--ignored, -C/--copies or -A/--all is given. Unless options
253 with "show only ..." are given, the options -mardu are used.
253 described with "show only ..." are given, the options -mardu are
254 used.
254
255
255 Option -q/--quiet hides untracked (unknown and ignored) files
256 Option -q/--quiet hides untracked (unknown and ignored) files
256 unless explicitly requested with -u/--unknown or -i/--ignored.
257 unless explicitly requested with -u/--unknown or -i/--ignored.
General Comments 0
You need to be logged in to leave comments. Login now