| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 6 |
<meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" /> |
| 7 |
<title>Environment Variables</title> |
| 8 |
<link rel="stylesheet" href="../style.css" type="text/css" /> |
| 9 |
</head> |
| 10 |
<body> |
| 11 |
<div class="document" id="environment-variables"> |
| 12 |
<span id="topic-environment"></span> |
| 13 |
<h1 class="title">Environment Variables</h1> |
| 14 |
|
| 15 |
<span id="environment"></span><dl class="docutils" id="env"> |
| 16 |
<dt>HG</dt> |
| 17 |
<dd>Path to the 'hg' executable, automatically passed when running |
| 18 |
hooks, extensions or external tools. If unset or empty, this is |
| 19 |
the hg executable's name if it's frozen, or an executable named |
| 20 |
'hg' (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on |
| 21 |
Windows) is searched.</dd> |
| 22 |
<dt>HGEDITOR</dt> |
| 23 |
<dd><p class="first">This is the name of the editor to run when committing. See EDITOR.</p> |
| 24 |
<p class="last">(deprecated, see <a class="reference external" href="hgrc.5.html#ui"><tt class="docutils literal">hg help config.ui.editor</tt></a>)</p> |
| 25 |
</dd> |
| 26 |
<dt>HGENCODING</dt> |
| 27 |
<dd>This overrides the default locale setting detected by Mercurial. |
| 28 |
This setting is used to convert data including usernames, |
| 29 |
changeset descriptions, tag names, and branches. This setting can |
| 30 |
be overridden with the --encoding command-line option.</dd> |
| 31 |
<dt>HGENCODINGMODE</dt> |
| 32 |
<dd>This sets Mercurial's behavior for handling unknown characters |
| 33 |
while transcoding user input. The default is "strict", which |
| 34 |
causes Mercurial to abort if it can't map a character. Other |
| 35 |
settings include "replace", which replaces unknown characters, and |
| 36 |
"ignore", which drops them. This setting can be overridden with |
| 37 |
the --encodingmode command-line option.</dd> |
| 38 |
<dt>HGENCODINGAMBIGUOUS</dt> |
| 39 |
<dd>This sets Mercurial's behavior for handling characters with |
| 40 |
"ambiguous" widths like accented Latin characters with East Asian |
| 41 |
fonts. By default, Mercurial assumes ambiguous characters are |
| 42 |
narrow, set this variable to "wide" if such characters cause |
| 43 |
formatting problems.</dd> |
| 44 |
<dt>HGMERGE</dt> |
| 45 |
<dd><p class="first">An executable to use for resolving merge conflicts. The program |
| 46 |
will be executed with three arguments: local file, remote file, |
| 47 |
ancestor file.</p> |
| 48 |
<p class="last">(deprecated, see <a class="reference external" href="hgrc.5.html#ui"><tt class="docutils literal">hg help config.ui.merge</tt></a>)</p> |
| 49 |
</dd> |
| 50 |
<dt>HGRCPATH</dt> |
| 51 |
<dd><p class="first">A list of files or directories to search for configuration |
| 52 |
files. Item separator is ":" on Unix, ";" on Windows. If HGRCPATH |
| 53 |
is not set, platform default search path is used. If empty, only |
| 54 |
the .hg/hgrc from the current repository is read.</p> |
| 55 |
<p>For each element in HGRCPATH:</p> |
| 56 |
<ul class="last simple"> |
| 57 |
<li>if it's a directory, all files ending with .rc are added</li> |
| 58 |
<li>otherwise, the file itself will be added</li> |
| 59 |
</ul> |
| 60 |
</dd> |
| 61 |
<dt>HGRCSKIPREPO</dt> |
| 62 |
<dd>When set, the .hg/hgrc from repositories are not read.</dd> |
| 63 |
<dt>HGPLAIN</dt> |
| 64 |
<dd><p class="first">When set, this disables any configuration settings that might |
| 65 |
change Mercurial's default output. This includes encoding, |
| 66 |
defaults, verbose mode, debug mode, quiet mode, tracebacks, and |
| 67 |
localization. This can be useful when scripting against Mercurial |
| 68 |
in the face of existing user configuration.</p> |
| 69 |
<p>In addition to the features disabled by <tt class="docutils literal">HGPLAIN=</tt>, the following |
| 70 |
values can be specified to adjust behavior:</p> |
| 71 |
<dl class="docutils"> |
| 72 |
<dt><tt class="docutils literal">+strictflags</tt></dt> |
| 73 |
<dd>Restrict parsing of command line flags.</dd> |
| 74 |
</dl> |
| 75 |
<p>Equivalent options set via command line flags or environment |
| 76 |
variables are not overridden.</p> |
| 77 |
<p class="last">See <a class="reference external" href="topic-scripting.html"><tt class="docutils literal">hg help scripting</tt></a> for details.</p> |
| 78 |
</dd> |
| 79 |
<dt>HGPLAINEXCEPT</dt> |
| 80 |
<dd><p class="first">This is a comma-separated list of features to preserve when |
| 81 |
HGPLAIN is enabled. Currently the following values are supported:</p> |
| 82 |
<dl class="docutils"> |
| 83 |
<dt><tt class="docutils literal">alias</tt></dt> |
| 84 |
<dd>Don't remove aliases.</dd> |
| 85 |
<dt><tt class="docutils literal">color</tt></dt> |
| 86 |
<dd>Don't disable colored output.</dd> |
| 87 |
<dt><tt class="docutils literal">i18n</tt></dt> |
| 88 |
<dd>Preserve internationalization.</dd> |
| 89 |
<dt><tt class="docutils literal">revsetalias</tt></dt> |
| 90 |
<dd>Don't remove revset aliases.</dd> |
| 91 |
<dt><tt class="docutils literal">templatealias</tt></dt> |
| 92 |
<dd>Don't remove template aliases.</dd> |
| 93 |
<dt><tt class="docutils literal">progress</tt></dt> |
| 94 |
<dd>Don't hide progress output.</dd> |
| 95 |
</dl> |
| 96 |
<p class="last">Setting HGPLAINEXCEPT to anything (even an empty string) will |
| 97 |
enable plain mode.</p> |
| 98 |
</dd> |
| 99 |
<dt>HGUSER</dt> |
| 100 |
<dd><p class="first">This is the string used as the author of a commit. If not set, |
| 101 |
available values will be considered in this order:</p> |
| 102 |
<ul class="simple"> |
| 103 |
<li>HGUSER (deprecated)</li> |
| 104 |
<li>configuration files from the HGRCPATH</li> |
| 105 |
<li>EMAIL</li> |
| 106 |
<li>interactive prompt</li> |
| 107 |
<li>LOGNAME (with <tt class="docutils literal">@hostname</tt> appended)</li> |
| 108 |
</ul> |
| 109 |
<p class="last">(deprecated, see <a class="reference external" href="hgrc.5.html#ui"><tt class="docutils literal">hg help config.ui.username</tt></a>)</p> |
| 110 |
</dd> |
| 111 |
<dt>EMAIL</dt> |
| 112 |
<dd>May be used as the author of a commit; see HGUSER.</dd> |
| 113 |
<dt>LOGNAME</dt> |
| 114 |
<dd>May be used as the author of a commit; see HGUSER.</dd> |
| 115 |
<dt>VISUAL</dt> |
| 116 |
<dd>This is the name of the editor to use when committing. See EDITOR.</dd> |
| 117 |
<dt>EDITOR</dt> |
| 118 |
<dd>Sometimes Mercurial needs to open a text file in an editor for a |
| 119 |
user to modify, for example when writing commit messages. The |
| 120 |
editor it uses is determined by looking at the environment |
| 121 |
variables HGEDITOR, VISUAL and EDITOR, in that order. The first |
| 122 |
non-empty one is chosen. If all of them are empty, the editor |
| 123 |
defaults to 'vi'.</dd> |
| 124 |
<dt>PYTHONPATH</dt> |
| 125 |
<dd>This is used by Python to find imported modules and may need to be |
| 126 |
set appropriately if this Mercurial is not installed system-wide.</dd> |
| 127 |
<dt>HGZSTDPOLICY</dt> |
| 128 |
<dd><p class="first">Control which zstd implementation will be used for the Python code. This is |
| 129 |
a list of options in priority order.</p> |
| 130 |
<ul class="simple"> |
| 131 |
<li>vendored: use the pinned version of python-zstandard shipped in Mercurial</li> |
| 132 |
<li>system: use a possibly installed "zstandard" python package</li> |
| 133 |
<li>none: don't use zstd (ommiting this will raise an error if the above |
| 134 |
fails)</li> |
| 135 |
</ul> |
| 136 |
<p>Default value is "vendored,system,none"</p> |
| 137 |
<p class="last">This variable might be deprecated in the future depending on how zstd wrapper |
| 138 |
library and they integration in Mercurial evolves. This config has no |
| 139 |
effect on the Rust code.</p> |
| 140 |
</dd> |
| 141 |
</dl> |
| 142 |
</div> |
| 143 |
</body> |
| 144 |
</html> |