changeset 51883:cd72a88c5599

censor: document the censor.policy option (issue6909) Censor is not marked as experimental and should be documented I am not doing this on stable because the help markup change it is using seems more suitable for default.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 05 Sep 2024 12:37:59 +0200
parents 76387080f238
children 243e805e8a2d
files hgext/censor.py mercurial/configitems.toml mercurial/helptext/config.txt
diffstat 3 files changed, 17 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/censor.py	Thu Sep 05 12:28:12 2024 +0200
+++ b/hgext/censor.py	Thu Sep 05 12:37:59 2024 +0200
@@ -24,10 +24,11 @@
 function in a meaningful way. Such commands only tolerate censored file
 As having a censored version in a checkout is impractical. The current head
 revisions of the repository are checked. If the revision to be censored is in
-any of them the command will abort.
+any of them the command will abort. You can configure this behavior using the
+following option:
 
-A few informative commands such as ``hg grep`` will unconditionally
-ignore censored data and merely report that it was encountered.
+    `censor.policy`
+        :config-doc:`censor.policy`
 """
 
 
--- a/mercurial/configitems.toml	Thu Sep 05 12:28:12 2024 +0200
+++ b/mercurial/configitems.toml	Thu Sep 05 12:37:59 2024 +0200
@@ -65,7 +65,13 @@
 section = "censor"
 name = "policy"
 default = "abort"
-experimental = true
+documentation="""Control how to react when accessing censored content.
+Accepted value: "abort", "ignore". Defaults to abort.
+
+A few informative commands such as ``hg grep`` will unconditionally ignore
+censored data and merely report that it was encountered.
+"""
+
 
 [[items]]
 section = "chgserver"
--- a/mercurial/helptext/config.txt	Thu Sep 05 12:28:12 2024 +0200
+++ b/mercurial/helptext/config.txt	Thu Sep 05 12:37:59 2024 +0200
@@ -418,6 +418,12 @@
 If no suitable authentication entry is found, the user is prompted
 for credentials as usual if required by the remote.
 
+``censor``
+----------
+
+``policy``
+    :config-doc:`censor.policy`
+
 ``cmdserver``
 -------------