Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 9892:4322e39bd525 stable
commands: use field lists instead of literal blocks in docstrings
The literal blocks were mis-used for alignment, but this of course
changes the font of the entire block to a fixed width font in the HTML
version. Using a proper list solves this.
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Thu, 19 Nov 2009 23:27:11 +0100 |
parents | 5c5a08d6f85d |
children | af873901b575 |
comparison
equal
deleted
inserted
replaced
9891:5c5a08d6f85d | 9892:4322e39bd525 |
---|---|
139 | 139 |
140 By default, the revision used is the parent of the working | 140 By default, the revision used is the parent of the working |
141 directory; use -r/--rev to specify a different revision. | 141 directory; use -r/--rev to specify a different revision. |
142 | 142 |
143 To specify the type of archive to create, use -t/--type. Valid | 143 To specify the type of archive to create, use -t/--type. Valid |
144 types are:: | 144 types are: |
145 | 145 |
146 "files" (default): a directory full of files | 146 :``files``: a directory full of files (default) |
147 "tar": tar archive, uncompressed | 147 :``tar``: tar archive, uncompressed |
148 "tbz2": tar archive, compressed using bzip2 | 148 :``tbz2``: tar archive, compressed using bzip2 |
149 "tgz": tar archive, compressed using gzip | 149 :``tgz``: tar archive, compressed using gzip |
150 "uzip": zip archive, uncompressed | 150 :``uzip``: zip archive, uncompressed |
151 "zip": zip archive, compressed using deflate | 151 :``zip``: zip archive, compressed using deflate |
152 | 152 |
153 The exact name of the destination archive or directory is given | 153 The exact name of the destination archive or directory is given |
154 using a format string; see 'hg help export' for details. | 154 using a format string; see 'hg help export' for details. |
155 | 155 |
156 Each member added to an archive file has a directory prefix | 156 Each member added to an archive file has a directory prefix |
559 no revision is given, the parent of the working directory is used, | 559 no revision is given, the parent of the working directory is used, |
560 or tip if no revision is checked out. | 560 or tip if no revision is checked out. |
561 | 561 |
562 Output may be to a file, in which case the name of the file is | 562 Output may be to a file, in which case the name of the file is |
563 given using a format string. The formatting rules are the same as | 563 given using a format string. The formatting rules are the same as |
564 for the export command, with the following additions:: | 564 for the export command, with the following additions: |
565 | 565 |
566 %s basename of file being printed | 566 :``%s``: basename of file being printed |
567 %d dirname of file being printed, or '.' if in repository root | 567 :``%d``: dirname of file being printed, or '.' if in repository root |
568 %p root-relative path name of file being printed | 568 :``%p``: root-relative path name of file being printed |
569 """ | 569 """ |
570 ctx = repo[opts.get('rev')] | 570 ctx = repo[opts.get('rev')] |
571 err = 1 | 571 err = 1 |
572 m = cmdutil.match(repo, (file1,) + pats, opts) | 572 m = cmdutil.match(repo, (file1,) + pats, opts) |
573 for abs in ctx.walk(m): | 573 for abs in ctx.walk(m): |
1138 NOTE: export may generate unexpected diff output for merge | 1138 NOTE: export may generate unexpected diff output for merge |
1139 changesets, as it will compare the merge changeset against its | 1139 changesets, as it will compare the merge changeset against its |
1140 first parent only. | 1140 first parent only. |
1141 | 1141 |
1142 Output may be to a file, in which case the name of the file is | 1142 Output may be to a file, in which case the name of the file is |
1143 given using a format string. The formatting rules are as follows:: | 1143 given using a format string. The formatting rules are as follows: |
1144 | 1144 |
1145 %% literal "%" character | 1145 :``%%``: literal "%" character |
1146 %H changeset hash (40 bytes of hexadecimal) | 1146 :``%H``: changeset hash (40 bytes of hexadecimal) |
1147 %N number of patches being generated | 1147 :``%N``: number of patches being generated |
1148 %R changeset revision number | 1148 :``%R``: changeset revision number |
1149 %b basename of the exporting repository | 1149 :``%b``: basename of the exporting repository |
1150 %h short-form changeset hash (12 bytes of hexadecimal) | 1150 :``%h``: short-form changeset hash (12 bytes of hexadecimal) |
1151 %n zero-padded sequence number, starting at 1 | 1151 :``%n``: zero-padded sequence number, starting at 1 |
1152 %r zero-padded changeset revision number | 1152 :``%r``: zero-padded changeset revision number |
1153 | 1153 |
1154 Without the -a/--text option, export will avoid generating diffs | 1154 Without the -a/--text option, export will avoid generating diffs |
1155 of files it detects as binary. With -a, export will generate a | 1155 of files it detects as binary. With -a, export will generate a |
1156 diff anyway, probably with undesirable results. | 1156 diff anyway, probably with undesirable results. |
1157 | 1157 |