[PATCH] help: remove last occurrences of ".. note::" without two newlines
Simon Heimberg
simohe at besonet.ch
Wed Feb 19 08:08:17 CST 2014
# HG changeset patch
# User Simon Heimberg <simohe at 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).
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.
More information about the Mercurial-devel
mailing list