

Mercurial comes with some default configuration. Options in these files override per-installation options. Options in these files apply to all Mercurial commands executed by any user in any directory. Per-system configuration files are for the system on which Mercurial is running. Mercurial checks each of these locations in the specified order until one or more configuration files are detected.

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. Per-installation configuration files are for the system on which Mercurial is running. is the parent directory of the hg executable (or symlink) being run.įor example, if installed in /shared/tools/bin/hg, Mercurial will look in /shared/tools/etc/mercurial/hgrc. Per-installation configuration files are searched for in the directory where Mercurial is installed. Options in these files override per-system and per-installation options.

Options in these files apply to all Mercurial commands executed by this user in any directory. Per-user configuration file(s) are for the user running Mercurial. 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. Options in this file override options in all other configuration files. This file is not version-controlled, and will not get transferred during a "clone" operation. Per-repository configuration options only apply in a particular repository. /lib/mercurial/hgrc.d/*.rc (per-system)./lib/mercurial/hgrc.d/*.rc (per-installation).On Plan9, the following files are consulted: The registry key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mercurial is used when running 32-bit Python on 64-bit Windows.

%PROGRAMDATA%\Mercurial\hgrc.d\*.rc (per-system).%PROGRAMDATA%\Mercurial\Mercurial.ini (per-system).%PROGRAMDATA%\Mercurial\hgrc (per-system).HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial (per-system).On Windows, the following files are consulted: /etc/mercurial/hgrc.d/*.rc (per-system)./etc/mercurial/hgrc.d/*.rc (per-installation).On Unix, the following files are consulted: Where multiple paths are given below, settings from earlier paths override later ones. *.rc files from a single directory are read in alphabetical order, later ones overriding earlier ones. The names of these files depend on the system on which Mercurial is installed. %USERPROFILE%\mercurial.ini (on Windows).Global configuration like the username setting is typically put into: Local configuration is put into the per-repository /.hg/hgrc file. These files do not exist by default and you will have to create the appropriate configuration files yourself: Mercurial reads configuration data from several files, if they exist. The above entries will be referred to as ui.username and ui.verbose, respectively. A configuration file consists of sections, led by a header and followed by name = value entries: The configuration files use a simple ini-file format. See hg help config.syntax and hg help config.files for information about how and where to override things. If you're having problems with your configuration, hg config -source can help you understand what is introducing a setting into your environment. The Mercurial system uses a set of configuration files to control aspects of its behavior. Configuration files for Mercurial Description
