rhg: add `config.rhg` helptext stable
authorRaphaël Gomès <rgomes@octobus.net>
Thu, 03 Nov 2022 15:42:33 +0100
branchstable
changeset 49564 b1c20e41098f
parent 49563 9dce3960735b
child 49565 04e6add9e4dc
rhg: add `config.rhg` helptext This will make using `rhg` more user-friendly and features more discoverable.
mercurial/helptext/config.txt
mercurial/helptext/rust.txt
rust/rhg/README.md
--- a/mercurial/helptext/config.txt	Thu Nov 03 15:44:54 2022 +0100
+++ b/mercurial/helptext/config.txt	Thu Nov 03 15:42:33 2022 +0100
@@ -2156,6 +2156,43 @@
     Currently, only the rebase and absorb commands consider this configuration.
     (EXPERIMENTAL)
 
+``rhg``
+-------
+
+The pure Rust fast-path for Mercurial. See `rust/README.rst` in the Mercurial repository.
+
+``fallback-executable``
+    Path to the executable to run in a sub-process when falling back to
+    another implementation of Mercurial.
+
+``ignored-extensions``
+    Controls which extensions should be ignored by `rhg`. By default, `rhg`
+    triggers the `rhg.on-unsupported` behavior any unsupported extensions.
+    Users can disable that behavior when they know that a given extension
+    does not need support from `rhg`.
+
+    Expects a list of extension names, or ``*`` to ignore all extensions.
+
+    Note: ``*:<suboption>`` is also a valid extension name for this
+    configuration option.
+    As of this writing, the only valid "global" suboption is ``required``.
+
+``on-unsupported``
+    Controls the behavior of `rhg` when detecting unsupported features.
+
+    Possible values are `abort` (default), `abort-silent` and `fallback`.
+
+    ``abort``
+        Print an error message describing what feature is not supported,
+        and exit with code 252
+
+    ``abort-silent``
+        Silently exit with code 252
+
+    ``fallback``
+        Try running the fallback executable with the same parameters
+        (and trace the fallback reason, use `RUST_LOG=trace` to see).
+
 ``share``
 ---------
 
--- a/mercurial/helptext/rust.txt	Thu Nov 03 15:44:54 2022 +0100
+++ b/mercurial/helptext/rust.txt	Thu Nov 03 15:42:33 2022 +0100
@@ -89,6 +89,8 @@
 The only way of trying it out is by building it from source. Please refer to
 `rust/README.rst` in the Mercurial repository.
 
+See `hg help config.rhg` for configuration options.
+
 Contributing
 ============
 
--- a/rust/rhg/README.md	Thu Nov 03 15:44:54 2022 +0100
+++ b/rust/rhg/README.md	Thu Nov 03 15:42:33 2022 +0100
@@ -19,35 +19,9 @@
 
 `rhg` reads Mercurial configuration from the usual sources:
 the user’s `~/.hgrc`, a repository’s `.hg/hgrc`, command line `--config`, etc.
-It has some specific configuration in the `[rhg]` section:
-
-* `on-unsupported` governs the behavior of `rhg` when it encounters something
-  that it does not support but “full” `hg` possibly does.
-  This can be in configuration, on the command line, or in a repository.
-
-  - `abort`, the default value, makes `rhg` print a message to stderr
-    to explain what is not supported, then terminate with a 252 exit code.
-  - `abort-silent` makes it terminate with the same exit code,
-    but without printing anything.
-  - `fallback` makes it silently call a (presumably Python-based) `hg`
-    subprocess with the same command-line parameters.
-    The `rhg.fallback-executable` configuration must be set.
+It has some specific configuration in the `[rhg]` section.
 
-* `fallback-executable`: path to the executable to run in a sub-process
-  when falling back to a Python implementation of Mercurial.
-
-* `allowed-extensions`: a list of extension names that `rhg` can ignore.
-
-  Mercurial extensions can modify the behavior of existing `hg` sub-commands,
-  including those that `rhg` otherwise supports.
-  Because it cannot load Python extensions, finding them
-  enabled in configuration is considered “unsupported” (see above).
-  A few exceptions are made for extensions that `rhg` does know about,
-  with the Rust implementation duplicating their behavior.
-
-  This configuration makes additional exceptions: `rhg` will proceed even if
-  those extensions are enabled.
-
+See `hg help config.rhg` for details.
 
 ## Installation and configuration example