help/config.txt
author Martin Geisler <mg@lazybytes.net>
Thu, 19 Nov 2009 22:25:38 +0100
branchstable
changeset 9891 5c5a08d6f85d
parent 9785 b52f0f221325
permissions -rw-r--r--
commands: do not indent list in clone help string
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9785
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     1
Mercurial reads configuration data from several files, if they exist.
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     2
Below we list the most specific file first.
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     3
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     4
On Windows, these configuration files are read:
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     5
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     6
- ``<repo>\.hg\hgrc``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     7
- ``%USERPROFILE%\.hgrc``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     8
- ``%USERPROFILE%\Mercurial.ini``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     9
- ``%HOME%\.hgrc``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    10
- ``%HOME%\Mercurial.ini``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    11
- ``C:\Mercurial\Mercurial.ini``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    12
- ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    13
- ``<install-dir>\Mercurial.ini``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    14
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    15
On Unix, these files are read:
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    16
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    17
- ``<repo>/.hg/hgrc``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    18
- ``$HOME/.hgrc``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    19
- ``/etc/mercurial/hgrc``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    20
- ``/etc/mercurial/hgrc.d/*.rc``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    21
- ``<install-root>/etc/mercurial/hgrc``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    22
- ``<install-root>/etc/mercurial/hgrc.d/*.rc``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    23
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    24
The configuration files for Mercurial use a simple ini-file format. A
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    25
configuration file consists of sections, led by a ``[section]`` header
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    26
and followed by ``name = value`` entries::
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    27
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    28
  [ui]
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    29
  username = Firstname Lastname <firstname.lastname@example.net>
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    30
  verbose = True
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    31
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    32
This above entries will be referred to as ``ui.username`` and
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    33
``ui.verbose``, respectively. Please see the hgrc man page for a full
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    34
description of the possible configuration values:
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    35
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    36
- on Unix-like systems: ``man hgrc``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    37
- online: http://www.selenic.com/mercurial/hgrc.5.html