doc/hgrc.5.txt
changeset 9659 f53c549237ca
parent 9630 24dad078603b
child 9697 59e5ae188440
equal deleted inserted replaced
9658:852b1f3032d2 9659:f53c549237ca
    27 
    27 
    28 Mercurial reads configuration data from several files, if they exist.
    28 Mercurial reads configuration data from several files, if they exist.
    29 The names of these files depend on the system on which Mercurial is
    29 The names of these files depend on the system on which Mercurial is
    30 installed. ``*.rc`` files from a single directory are read in
    30 installed. ``*.rc`` files from a single directory are read in
    31 alphabetical order, later ones overriding earlier ones. Where multiple
    31 alphabetical order, later ones overriding earlier ones. Where multiple
    32 paths are given below, settings from later paths override earlier
    32 paths are given below, settings from earlier paths override later
    33 ones.
    33 ones.
    34 
       
    35 | (Unix) ``<install-root>/etc/mercurial/hgrc.d/*.rc``
       
    36 | (Unix) ``<install-root>/etc/mercurial/hgrc``
       
    37 
       
    38     Per-installation configuration files, searched for in the
       
    39     directory where Mercurial is installed. ``<install-root>`` is the
       
    40     parent directory of the **hg** executable (or symlink) being run. For
       
    41     example, if installed in ``/shared/tools/bin/hg``, Mercurial will look
       
    42     in ``/shared/tools/etc/mercurial/hgrc``. Options in these files apply
       
    43     to all Mercurial commands executed by any user in any directory.
       
    44 
       
    45 | (Unix) ``/etc/mercurial/hgrc.d/*.rc``
       
    46 | (Unix) ``/etc/mercurial/hgrc``
       
    47 
       
    48     Per-system configuration files, for the system on which Mercurial
       
    49     is running. Options in these files apply to all Mercurial commands
       
    50     executed by any user in any directory. Options in these files
       
    51     override per-installation options.
       
    52 
       
    53 | (Windows) ``<install-dir>\Mercurial.ini`` or else
       
    54 | (Windows) ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` or else
       
    55 | (Windows) ``C:\Mercurial\Mercurial.ini``
       
    56 
       
    57     Per-installation/system configuration files, for the system on
       
    58     which Mercurial is running. Options in these files apply to all
       
    59     Mercurial commands executed by any user in any directory. Registry
       
    60     keys contain PATH-like strings, every part of which must reference
       
    61     a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will
       
    62     be read.
       
    63 
       
    64 | (Unix) ``$HOME/.hgrc``
       
    65 | (Windows) ``%HOME%\Mercurial.ini``
       
    66 | (Windows) ``%HOME%\.hgrc``
       
    67 | (Windows) ``%USERPROFILE%\Mercurial.ini``
       
    68 | (Windows) ``%USERPROFILE%\.hgrc``
       
    69 
       
    70     Per-user configuration file(s), for the user running Mercurial. On
       
    71     Windows 9x, ``%HOME%`` is replaced by ``%APPDATA%``. Options in these
       
    72     files apply to all Mercurial commands executed by this user in any
       
    73     directory. Options in these files override per-installation and
       
    74     per-system options.
       
    75 
    34 
    76 | (Unix, Windows) ``<repo>/.hg/hgrc``
    35 | (Unix, Windows) ``<repo>/.hg/hgrc``
    77 
    36 
    78     Per-repository configuration options that only apply in a
    37     Per-repository configuration options that only apply in a
    79     particular repository. This file is not version-controlled, and
    38     particular repository. This file is not version-controlled, and
    80     will not get transferred during a "clone" operation. Options in
    39     will not get transferred during a "clone" operation. Options in
    81     this file override options in all other configuration files. On
    40     this file override options in all other configuration files. On
    82     Unix, most of this file will be ignored if it doesn't belong to a
    41     Unix, most of this file will be ignored if it doesn't belong to a
    83     trusted user or to a trusted group. See the documentation for the
    42     trusted user or to a trusted group. See the documentation for the
    84     trusted section below for more details.
    43     trusted section below for more details.
       
    44 
       
    45 | (Unix) ``$HOME/.hgrc``
       
    46 | (Windows) ``%USERPROFILE%\.hgrc``
       
    47 | (Windows) ``%USERPROFILE%\Mercurial.ini``
       
    48 | (Windows) ``%HOME%\.hgrc``
       
    49 | (Windows) ``%HOME%\Mercurial.ini``
       
    50 
       
    51     Per-user configuration file(s), for the user running Mercurial. On
       
    52     Windows 9x, ``%HOME%`` is replaced by ``%APPDATA%``. Options in these
       
    53     files apply to all Mercurial commands executed by this user in any
       
    54     directory. Options in these files override per-system and per-installation
       
    55     options.
       
    56 
       
    57 | (Unix) ``/etc/mercurial/hgrc``
       
    58 | (Unix) ``/etc/mercurial/hgrc.d/*.rc``
       
    59 
       
    60     Per-system configuration files, for the system on which Mercurial
       
    61     is running. Options in these files apply to all Mercurial commands
       
    62     executed by any user in any directory. Options in these files
       
    63     override per-installation options.
       
    64 
       
    65 | (Unix) ``<install-root>/etc/mercurial/hgrc``
       
    66 | (Unix) ``<install-root>/etc/mercurial/hgrc.d/*.rc``
       
    67 
       
    68     Per-installation configuration files, searched for in the
       
    69     directory where Mercurial is installed. ``<install-root>`` is the
       
    70     parent directory of the **hg** executable (or symlink) being run. For
       
    71     example, if installed in ``/shared/tools/bin/hg``, Mercurial will look
       
    72     in ``/shared/tools/etc/mercurial/hgrc``. Options in these files apply
       
    73     to all Mercurial commands executed by any user in any directory.
       
    74 
       
    75 | (Windows) ``C:\Mercurial\Mercurial.ini``
       
    76 | (Windows) ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial``
       
    77 | (Windows) ``<install-dir>\Mercurial.ini``
       
    78 
       
    79     Per-installation/system configuration files, for the system on
       
    80     which Mercurial is running. Options in these files apply to all
       
    81     Mercurial commands executed by any user in any directory. Registry
       
    82     keys contain PATH-like strings, every part of which must reference
       
    83     a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will
       
    84     be read.
    85 
    85 
    86 SYNTAX
    86 SYNTAX
    87 ------
    87 ------
    88 
    88 
    89 A configuration file consists of sections, led by a ``[section]`` header
    89 A configuration file consists of sections, led by a ``[section]`` header