[PATCH 1 of 4 evolve-ext] doc: make paragraphs before example code end with "::" for reST syntax

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Thu Sep 14 16:33:12 UTC 2017


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1502115897 -32400
#      Mon Aug 07 23:24:57 2017 +0900
# Node ID 36c09de6c9765c41393c92298b0455b9491b91dc
# Parent  23c9600607e7ea3c6d95cddc5ad134cab4f7d7fe
# Available At https://foozy@bitbucket.org/foozy/hgext-evolve
#              hg pull https://foozy@bitbucket.org/foozy/hgext-evolve -r 36c09de6c976
# EXP-Topic doc-improvement
doc: make paragraphs before example code end with "::" for reST syntax

This prevents lines in an example code from being treated as a part of
normal paragraph. For issue example, lines are folded into one
paragraph.

diff --git a/hgext3rd/evolve/__init__.py b/hgext3rd/evolve/__init__.py
--- a/hgext3rd/evolve/__init__.py
+++ b/hgext3rd/evolve/__init__.py
@@ -34,7 +34,7 @@ experimental protocol are also supported
 help people transitioning. (The extensions is currently compatible down to
 Mercurial version 3.8).
 
-New Config:
+New Config::
 
     [experimental]
     # Set to control the behavior when pushing draft changesets to a publishing
@@ -103,7 +103,7 @@ implementation of some of the algorithms
 
 For very large repositories. it is currently recommended to disable obsmarkers
 discovery (Make sure you follow release announcement to know when you can turn
-it back on).
+it back on)::
 
     [experimental]
     evolution.obsdiscovery = no
@@ -137,7 +137,7 @@ The following config control the effect 
   # evolution.effect-flags = false
 
 You can display the effect flags with the command obslog, so if you have a
-changeset and you update only the message, you will see:
+changeset and you update only the message, you will see::
 
     $ hg commit -m "WIP
     $ hg commit -m "A better commit message!"
diff --git a/hgext3rd/evolve/cmdrewrite.py b/hgext3rd/evolve/cmdrewrite.py
--- a/hgext3rd/evolve/cmdrewrite.py
+++ b/hgext3rd/evolve/cmdrewrite.py
@@ -350,7 +350,7 @@ def fold(ui, repo, *revs, **opts):
 
          hg fold --from 3::6
 
-     - Fold revisions 3 and 4:
+     - Fold revisions 3 and 4::
 
         hg fold "3 + 4" --exact
 
diff --git a/hgext3rd/topic/__init__.py b/hgext3rd/topic/__init__.py
--- a/hgext3rd/topic/__init__.py
+++ b/hgext3rd/topic/__init__.py
@@ -319,23 +319,29 @@ def reposetup(ui, repo):
 def topics(ui, repo, topic=None, clear=False, rev=None, list=False, **opts):
     """View current topic, set current topic, change topic for a set of revisions, or see all topics.
 
-    Clear topic on existing topiced revisions:
-        `hg topic --rev <related revset> --clear`
-
-    Change topic on some revisions:
-        `hg topic <newtopicname> --rev <related revset>`
-
-    Clear current topic:
-        `hg topic --clear`
-
-    Set current topic:
-        `hg topic <topicname>`
-
-    List of topics:
-        `hg topics`
-
-    List of topics with their last touched time sorted according to it:
-        `hg topic --age`
+    Clear topic on existing topiced revisions::
+
+      hg topic --rev <related revset> --clear
+
+    Change topic on some revisions::
+
+      hg topic <newtopicname> --rev <related revset>
+
+    Clear current topic::
+
+      hg topic --clear
+
+    Set current topic::
+
+      hg topic <topicname>
+
+    List of topics::
+
+      hg topics
+
+    List of topics with their last touched time sorted according to it::
+
+      hg topic --age
 
     The active topic (if any) will be prepended with a "*".
 
diff --git a/tests/test-topic.t b/tests/test-topic.t
--- a/tests/test-topic.t
+++ b/tests/test-topic.t
@@ -19,22 +19,28 @@
   see all topics.
   
       Clear topic on existing topiced revisions:
-          'hg topic --rev <related revset> --clear'
+  
+        hg topic --rev <related revset> --clear
   
       Change topic on some revisions:
-          'hg topic <newtopicname> --rev <related revset>'
+  
+        hg topic <newtopicname> --rev <related revset>
   
       Clear current topic:
-          'hg topic --clear'
+  
+        hg topic --clear
   
       Set current topic:
-          'hg topic <topicname>'
+  
+        hg topic <topicname>
   
       List of topics:
-          'hg topics'
+  
+        hg topics
   
       List of topics with their last touched time sorted according to it:
-          'hg topic --age'
+  
+        hg topic --age
   
       The active topic (if any) will be prepended with a "*".
   


More information about the Mercurial-devel mailing list