help/config.txt
changeset 9999 f91e5630ce7e
parent 9998 4a3c388f8c69
child 10000 16f49d671c7f
equal deleted inserted replaced
9998:4a3c388f8c69 9999:f91e5630ce7e
     1 Mercurial reads configuration data from several files, if they exist.
       
     2 Below we list the most specific file first.
       
     3 
       
     4 On Windows, these configuration files are read:
       
     5 
       
     6 - ``<repo>\.hg\hgrc``
       
     7 - ``%USERPROFILE%\.hgrc``
       
     8 - ``%USERPROFILE%\Mercurial.ini``
       
     9 - ``%HOME%\.hgrc``
       
    10 - ``%HOME%\Mercurial.ini``
       
    11 - ``C:\Mercurial\Mercurial.ini``
       
    12 - ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial``
       
    13 - ``<install-dir>\Mercurial.ini``
       
    14 
       
    15 On Unix, these files are read:
       
    16 
       
    17 - ``<repo>/.hg/hgrc``
       
    18 - ``$HOME/.hgrc``
       
    19 - ``/etc/mercurial/hgrc``
       
    20 - ``/etc/mercurial/hgrc.d/*.rc``
       
    21 - ``<install-root>/etc/mercurial/hgrc``
       
    22 - ``<install-root>/etc/mercurial/hgrc.d/*.rc``
       
    23 
       
    24 The configuration files for Mercurial use a simple ini-file format. A
       
    25 configuration file consists of sections, led by a ``[section]`` header
       
    26 and followed by ``name = value`` entries::
       
    27 
       
    28   [ui]
       
    29   username = Firstname Lastname <firstname.lastname@example.net>
       
    30   verbose = True
       
    31 
       
    32 This above entries will be referred to as ``ui.username`` and
       
    33 ``ui.verbose``, respectively. Please see the hgrc man page for a full
       
    34 description of the possible configuration values:
       
    35 
       
    36 - on Unix-like systems: ``man hgrc``
       
    37 - online: http://www.selenic.com/mercurial/hgrc.5.html