файлы конфигурации для Mercurial (configuration files for Mercurial)
Файлы (Files)
Mercurial reads configuration data from several files, if they
exist. These files do not exist by default and you will have to
create the appropriate configuration files yourself: global
configuration like the username setting is typically put into
%USERPROFILE%\mercurial.ini
or $HOME/.hgrc
and local
configuration is put into the per-repository <repo>/.hg/hgrc
file.
The names of these files depend on the system on which Mercurial
is installed. *.rc
files from a single directory are read in
alphabetical order, later ones overriding earlier ones. Where
multiple paths are given below, settings from earlier paths
override later ones.
(All) <repo>/.hg/hgrc
Per-repository configuration options that only apply in a
particular repository. This file is not version-controlled,
and will not get transferred during a "clone" operation.
Options in this file override options in all other
configuration files. On Plan 9 and Unix, most of this file
will be ignored if it doesn't belong to a trusted user or to a
trusted group. See the documentation for the [trusted]
section
below for more details.
(Plan 9) $home/lib/hgrc
(Unix) $HOME/.hgrc
(Windows) %USERPROFILE%\.hgrc
(Windows) %USERPROFILE%\Mercurial.ini
(Windows) %HOME%\.hgrc
(Windows) %HOME%\Mercurial.ini
Per-user configuration file(s), for the user running
Mercurial. On Windows 9x, %HOME%
is replaced by %APPDATA%
.
Options in these files apply to all Mercurial commands
executed by this user in any directory. Options in these files
override per-system and per-installation options.
(Plan 9) /lib/mercurial/hgrc
(Plan 9) /lib/mercurial/hgrc.d/*.rc
(Unix) /etc/mercurial/hgrc
(Unix) /etc/mercurial/hgrc.d/*.rc
Per-system configuration files, for the system on which
Mercurial is running. Options in these files apply to all
Mercurial commands executed by any user in any directory.
Options in these files override per-installation options.
(Plan 9) <install-root>/lib/mercurial/hgrc
(Plan 9) <install-root>/lib/mercurial/hgrc.d/*.rc
(Unix) <install-root>/etc/mercurial/hgrc
(Unix) <install-root>/etc/mercurial/hgrc.d/*.rc
Per-installation configuration files, searched for in the
directory where Mercurial is installed. <install-root>
is the
parent directory of the hg
executable (or symlink) being run.
For example, if installed in /shared/tools/bin/hg
, Mercurial
will look in /shared/tools/etc/mercurial/hgrc
. Options in
these files apply to all Mercurial commands executed by any
user in any directory.
(Windows) <install-dir>\Mercurial.ini or
(Windows) <install-dir>\hgrc.d\*.rc or
(Windows) HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial
Per-installation/system configuration files, for the system on
which Mercurial is running. Options in these files apply to
all Mercurial commands executed by any user in any directory.
Registry keys contain PATH-like strings, every part of which
must reference a Mercurial.ini
file or be a directory where
*.rc
files will be read. Mercurial checks each of these
locations in the specified order until one or more
configuration files are detected.
Note The registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial
is used
when running 32-bit Python on 64-bit Windows.