[PATCH STABLE] help: machines help topic
raf at durin42.com
Sun Jul 19 12:26:28 CDT 2015
> On Jul 18, 2015, at 8:12 PM, Gregory Szorc <gregory.szorc at gmail.com> wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1437264628 25200
> # Sat Jul 18 17:10:28 2015 -0700
> # Node ID 28b1e76a85fb542e0fdfb1f383733192c83f14ca
> # Parent eabba9c75061254ff62827f92df0f32491c74b3d
> help: machines help topic
Seems like a good idea to me. I might call it ‘scripting’ but I don’t really care what color the bikeshed is.
> # Map topics to lists of callable taking the current topic help and
> # returning the updated version
> diff --git a/mercurial/help/machines.txt b/mercurial/help/machines.txt
> new file mode 100644
> --- /dev/null
> +++ b/mercurial/help/machines.txt
> +As documented in :hg:`help environment`, various environment variables
> +influence the operation of Mercurial. The following are particularly
> +relevant for machines consuming Mercurial:
> + If not set, Mercurial's output could be influenced by configuration
> + settings that impact its encoding, verbose mode, localization, etc.
> + It is highly recommended for machines to set this variable when
> + invoking ``hg`` processes.
Should we really be pointing at this? What cases does this help that HGPLAIN doesn’t already solve?
Concretely, this might cause naive scripters to be unable to work with repositories that require extensions enabled system-wide (I think this is the case at Facebook, and I expect that to be the case for us as well.)
> + If not set, Mercurial will inherit config options from config files
> + using the process described in :hg:`help config`. This includes
> + inheriting user or system-wide config files.
> + Because config files can alter the behavior of Mercurial, not
> + setting HGRCPATH to a file with a known acceptable configuration
> + could lead to unwanted or inconsistent operation.
> + The value of HGRCPATH can be set to an empty file or the null device
> + (often ``/dev/null``) to bypass loading of the user and system
> + config files.
> + If not set, the locale used by Mercurial will be detected from the
> + environment.
> + Explcitly setting this environment variable (commonly to "utf-8")
> + is a good practice to guarantee consistent results.
Huh, interesting. I learned something sad today.
(rest of the patch looks fine, FWIW)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the Mercurial-devel