# HG changeset patch # User Pierre-Yves David # Date 2024-09-05 10:37:59 # Node ID cd72a88c559992cd50f1d204a71c68a0e0930e6f # Parent 76387080f238b008ca5ead62640993547835b418 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. diff --git a/hgext/censor.py b/hgext/censor.py --- a/hgext/censor.py +++ b/hgext/censor.py @@ -24,10 +24,11 @@ simply fail when asked to produce censor 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` """ diff --git a/mercurial/configitems.toml b/mercurial/configitems.toml --- a/mercurial/configitems.toml +++ b/mercurial/configitems.toml @@ -65,7 +65,13 @@ default = "" 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" diff --git a/mercurial/helptext/config.txt b/mercurial/helptext/config.txt --- a/mercurial/helptext/config.txt +++ b/mercurial/helptext/config.txt @@ -418,6 +418,12 @@ Supported arguments: 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`` -------------