[PATCH 5 of 6 STABLE] doc: flatten description of 'matching()' predicate to be formatted well

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Thu Apr 26 07:38:29 CDT 2012


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1335443568 -32400
# Branch stable
# Node ID 5a697ab463387ab6e7c934765e7858730e8af97e
# Parent  2e36977bd1162d1c53af4118898249c6d2fdafe5
doc: flatten description of 'matching()' predicate to be formatted well

current description of 'matching()' revset predicate can't be
formatted well on "hg help revset" output.

each descriptions for revset predicates (or something like them) are
split-ed into lines, and spaces on left side of them are stripped
before minirst processing. so, bullet list can't be nested.

this patch just flattens description of 'matching()' predicate to be
formatted well.

diff -r 2e36977bd116 -r 5a697ab46338 mercurial/revset.py
--- a/mercurial/revset.py	Thu Apr 26 21:32:48 2012 +0900
+++ b/mercurial/revset.py	Thu Apr 26 21:32:48 2012 +0900
@@ -921,19 +921,23 @@
     """``matching(revision [, field])``
     Changesets in which a given set of fields match the set of fields in the
     selected revision or set.
+
     To match more than one field pass the list of fields to match separated
-    by spaces (e.g. 'author description').
-    Valid fields are most regular revision fields and some special fields:
-    * regular fields:
-      - description, author, branch, date, files, phase, parents,
-      substate, user.
-      Note that author and user are synonyms.
-    * special fields: summary, metadata.
-      - summary: matches the first line of the description.
-      - metatadata: It is equivalent to matching 'description user date'
-        (i.e. it matches the main metadata fields).
-    metadata is the default field which is used when no fields are specified.
-    You can match more than one field at a time.
+    by spaces (e.g. ``author description``).
+
+    Valid fields are most regular revision fields and some special fields.
+
+    Regular revision fields are ``description``, ``author``, ``branch``,
+    ``date``, ``files``, ``phase``, ``parents``, ``substate`` and ``user``.
+    Note that ``author`` and ``user`` are synonyms.
+
+    Special fields are ``summary`` and ``metadata``:
+    ``summary`` matches the first line of the description.
+    ``metatadata`` is equivalent to matching ``description user date``
+    (i.e. it matches the main metadata fields).
+
+    ``metadata`` is the default field which is used when no fields are
+    specified. You can match more than one field at a time.
     """
     l = getargs(x, 1, 2, _("matching takes 1 or 2 arguments"))
 


More information about the Mercurial-devel mailing list