Patchwork help: remove last occurrences of ".. note::" without two newlines

login
register
mail settings
Submitter Simon Heimberg
Date Feb. 19, 2014, 2:08 p.m.
Message ID <aaaec28a6886184c72ea.1392818897@lapsi.heimberg.home>
Download mbox | patch
Permalink /patch/3697/
State Accepted
Commit f1a3ae7c15df06eb64c828a4ee5d814d3810d449
Headers show

Comments

Simon Heimberg - Feb. 19, 2014, 2:08 p.m.
# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 1392812728 -3600
#      Wed Feb 19 13:25:28 2014 +0100
# Node ID aaaec28a6886184c72ea8268ce4a3c2de4b71a87
# Parent  0e2877f8605dcaf4fdf2ab7e0046f1f6f80161dd
help: remove last occurrences of ".. note::" without two newlines

When we add two newlines after ".. note::" translators will not see this
entry. And all versions of docutils interpret this paragraph correctly
(details in de16c673455b).
Matt Mackall - Feb. 19, 2014, 10:13 p.m.
On Wed, 2014-02-19 at 15:08 +0100, Simon Heimberg wrote:
> # HG changeset patch
> # User Simon Heimberg <simohe@besonet.ch>
> # Date 1392812728 -3600
> #      Wed Feb 19 13:25:28 2014 +0100
> # Node ID aaaec28a6886184c72ea8268ce4a3c2de4b71a87
> # Parent  0e2877f8605dcaf4fdf2ab7e0046f1f6f80161dd
> help: remove last occurrences of ".. note::" without two newlines

Queued for default, thanks.

Patch

diff -r 0e2877f8605d -r aaaec28a6886 contrib/check-code.py
--- a/contrib/check-code.py	Sat Feb 15 22:09:32 2014 -0600
+++ b/contrib/check-code.py	Wed Feb 19 13:25:28 2014 +0100
@@ -311,6 +311,7 @@ 
 txtpats = [
   [
     ('\s$', 'trailing whitespace'),
+    ('.. note::[ \n][^\n]', 'add two newlines after note::')
   ],
   []
 ]
diff -r 0e2877f8605d -r aaaec28a6886 mercurial/help/config.txt
--- a/mercurial/help/config.txt	Sat Feb 15 22:09:32 2014 -0600
+++ b/mercurial/help/config.txt	Wed Feb 19 13:25:28 2014 +0100
@@ -85,7 +85,9 @@ 
     be read.  Mercurial checks each of these locations in the specified
     order until one or more configuration files are detected.
 
-.. note:: The registry key ``HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial``
+.. note::
+
+   The registry key ``HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial``
    is used when running 32-bit Python on 64-bit Windows.
 
 Syntax
@@ -204,7 +206,9 @@ 
 
     stable5 = latest -b stable
 
-.. note:: It is possible to create aliases with the same names as
+.. note::
+
+   It is possible to create aliases with the same names as
    existing commands, which will then override the original
    definitions. This is almost always a bad idea!
 
@@ -235,7 +239,9 @@ 
 ``$HG_ARGS`` expands to the arguments given to Mercurial. In the ``hg
 echo foo`` call above, ``$HG_ARGS`` would expand to ``echo foo``.
 
-.. note:: Some global configuration options such as ``-R`` are
+.. note::
+
+   Some global configuration options such as ``-R`` are
    processed before shell aliases and will thus not be passed to
    aliases.
 
@@ -362,7 +368,9 @@ 
 of an empty temporary file, where the filtered data must be written by
 the command.
 
-.. note:: The tempfile mechanism is recommended for Windows systems,
+.. note::
+
+   The tempfile mechanism is recommended for Windows systems,
    where the standard shell I/O redirection operators often have
    strange effects and may corrupt the contents of your files.
 
@@ -708,13 +716,17 @@ 
   in ``$HG_PARENT2``. If the update succeeded, ``$HG_ERROR=0``. If the
   update failed (e.g. because conflicts not resolved), ``$HG_ERROR=1``.
 
-.. note:: It is generally better to use standard hooks rather than the
+.. note::
+
+   It is generally better to use standard hooks rather than the
    generic pre- and post- command hooks as they are guaranteed to be
    called in the appropriate contexts for influencing transactions.
    Also, hooks like "commit" will be called in all contexts that
    generate a commit (e.g. tag) and not just the commit command.
 
-.. note:: Environment variables with empty values may not be passed to
+.. note::
+
+   Environment variables with empty values may not be passed to
    hooks on platforms such as Windows. As an example, ``$HG_PARENT2``
    will have an empty value under Unix-like platforms for non-merge
    changesets, while it will not be available at all under Windows.