Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Mercurial configuration files on Windows

📅 2012-Dec-06 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive

On Windows, there are three types of configuration files read by Mercurial: local (to a particular repository), per-user and per-system. When a configuration setting appears in more than one of these files, the local overrides per-user which overrides per-system.

The local configuration file is named hgrc and is found in the .hg subdirectory of the repository.

The per-user configuration file can be named either .hgrc or Mercurial.ini. It can be placed either in %USERPROFILE% or %HOMEDRIVE%%HOMEPATH% directory.

The per-system configuration file has to be named Mercurial.ini. It can be in the installation directory of Mercurial.

There are a couple of other per-system configuration options that are more complicated: .rc files in the installation directory or using the registry.

More information about configuration file names and paths can be found using:

$ hg help config

Tried with: Mercurial 2.3.2