changeset 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
files mercurial/commands.py tests/test-dispatch.out
diffstat 2 files changed, 26 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Nov 19 22:25:38 2009 +0100
+++ b/mercurial/commands.py	Thu Nov 19 23:27:11 2009 +0100
@@ -141,14 +141,14 @@
     directory; use -r/--rev to specify a different revision.
 
     To specify the type of archive to create, use -t/--type. Valid
-    types are::
-
-      "files" (default): a directory full of files
-      "tar": tar archive, uncompressed
-      "tbz2": tar archive, compressed using bzip2
-      "tgz": tar archive, compressed using gzip
-      "uzip": zip archive, uncompressed
-      "zip": zip archive, compressed using deflate
+    types are:
+
+    :``files``: a directory full of files (default)
+    :``tar``:   tar archive, uncompressed
+    :``tbz2``:  tar archive, compressed using bzip2
+    :``tgz``:   tar archive, compressed using gzip
+    :``uzip``:  zip archive, uncompressed
+    :``zip``:   zip archive, compressed using deflate
 
     The exact name of the destination archive or directory is given
     using a format string; see 'hg help export' for details.
@@ -561,11 +561,11 @@
 
     Output may be to a file, in which case the name of the file is
     given using a format string. The formatting rules are the same as
-    for the export command, with the following additions::
-
-      %s   basename of file being printed
-      %d   dirname of file being printed, or '.' if in repository root
-      %p   root-relative path name of file being printed
+    for the export command, with the following additions:
+
+    :``%s``: basename of file being printed
+    :``%d``: dirname of file being printed, or '.' if in repository root
+    :``%p``: root-relative path name of file being printed
     """
     ctx = repo[opts.get('rev')]
     err = 1
@@ -1140,16 +1140,16 @@
     first parent only.
 
     Output may be to a file, in which case the name of the file is
-    given using a format string. The formatting rules are as follows::
-
-      %%   literal "%" character
-      %H   changeset hash (40 bytes of hexadecimal)
-      %N   number of patches being generated
-      %R   changeset revision number
-      %b   basename of the exporting repository
-      %h   short-form changeset hash (12 bytes of hexadecimal)
-      %n   zero-padded sequence number, starting at 1
-      %r   zero-padded changeset revision number
+    given using a format string. The formatting rules are as follows:
+
+    :``%%``: literal "%" character
+    :``%H``: changeset hash (40 bytes of hexadecimal)
+    :``%N``: number of patches being generated
+    :``%R``: changeset revision number
+    :``%b``: basename of the exporting repository
+    :``%h``: short-form changeset hash (12 bytes of hexadecimal)
+    :``%n``: zero-padded sequence number, starting at 1
+    :``%r``: zero-padded changeset revision number
 
     Without the -a/--text option, export will avoid generating diffs
     of files it detects as binary. With -a, export will generate a
--- a/tests/test-dispatch.out	Thu Nov 19 22:25:38 2009 +0100
+++ b/tests/test-dispatch.out	Thu Nov 19 23:27:11 2009 +0100
@@ -13,9 +13,9 @@
     a format string. The formatting rules are the same as for the export
     command, with the following additions:
 
-      %s   basename of file being printed
-      %d   dirname of file being printed, or '.' if in repository root
-      %p   root-relative path name of file being printed
+    "%s"   basename of file being printed
+    "%d"   dirname of file being printed, or '.' if in repository root
+    "%p"   root-relative path name of file being printed
 
 options: