comparison rust/rhg/README.md @ 49564:b1c20e41098f stable

rhg: add `config.rhg` helptext This will make using `rhg` more user-friendly and features more discoverable.
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 03 Nov 2022 15:42:33 +0100
parents 6df528ed47a9
children
comparison
equal deleted inserted replaced
49563:9dce3960735b 49564:b1c20e41098f
17 17
18 ## Mercurial configuration 18 ## Mercurial configuration
19 19
20 `rhg` reads Mercurial configuration from the usual sources: 20 `rhg` reads Mercurial configuration from the usual sources:
21 the user’s `~/.hgrc`, a repository’s `.hg/hgrc`, command line `--config`, etc. 21 the user’s `~/.hgrc`, a repository’s `.hg/hgrc`, command line `--config`, etc.
22 It has some specific configuration in the `[rhg]` section: 22 It has some specific configuration in the `[rhg]` section.
23 23
24 * `on-unsupported` governs the behavior of `rhg` when it encounters something 24 See `hg help config.rhg` for details.
25 that it does not support but “full” `hg` possibly does.
26 This can be in configuration, on the command line, or in a repository.
27
28 - `abort`, the default value, makes `rhg` print a message to stderr
29 to explain what is not supported, then terminate with a 252 exit code.
30 - `abort-silent` makes it terminate with the same exit code,
31 but without printing anything.
32 - `fallback` makes it silently call a (presumably Python-based) `hg`
33 subprocess with the same command-line parameters.
34 The `rhg.fallback-executable` configuration must be set.
35
36 * `fallback-executable`: path to the executable to run in a sub-process
37 when falling back to a Python implementation of Mercurial.
38
39 * `allowed-extensions`: a list of extension names that `rhg` can ignore.
40
41 Mercurial extensions can modify the behavior of existing `hg` sub-commands,
42 including those that `rhg` otherwise supports.
43 Because it cannot load Python extensions, finding them
44 enabled in configuration is considered “unsupported” (see above).
45 A few exceptions are made for extensions that `rhg` does know about,
46 with the Rust implementation duplicating their behavior.
47
48 This configuration makes additional exceptions: `rhg` will proceed even if
49 those extensions are enabled.
50
51 25
52 ## Installation and configuration example 26 ## Installation and configuration example
53 27
54 For example, to install `rhg` as `hg` for the current user with fallback to 28 For example, to install `rhg` as `hg` for the current user with fallback to
55 the system-wide install of Mercurial, and allow it to run even though the 29 the system-wide install of Mercurial, and allow it to run even though the