mercurial/help/config.txt
author Steve Borho <steve@borho.org>
Thu, 07 Jan 2010 22:19:05 -0600
changeset 11184 7d99edddbaea
parent 11016 6a539853d4c0
child 11408 534c69494918
permissions -rw-r--r--
extdiff: add labels, read diff arguments from [merge-tools] hgtk has been using these same configs since Feb. Users only have to name the tools they would like to use, ex: [extdiff] kdiff3 = meld =
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``
11016
6a539853d4c0 help config: update windows documentation to match implementation
Mads Kiilerich <mads@kiilerich.com>
parents: 10998
diff changeset
     8
- ``%USERPROFILE%\mercurial.ini``
9785
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
     9
- ``%HOME%\.hgrc``
11016
6a539853d4c0 help config: update windows documentation to match implementation
Mads Kiilerich <mads@kiilerich.com>
parents: 10998
diff changeset
    10
- ``%HOME%\mercurial.ini``
6a539853d4c0 help config: update windows documentation to match implementation
Mads Kiilerich <mads@kiilerich.com>
parents: 10998
diff changeset
    11
- ``C:\mercurial\mercurial.ini`` (unless regkey or hgrc.d\ or mercurial.ini found)
6a539853d4c0 help config: update windows documentation to match implementation
Mads Kiilerich <mads@kiilerich.com>
parents: 10998
diff changeset
    12
- ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` (unless hgrc.d\ or mercurial.ini found)
6a539853d4c0 help config: update windows documentation to match implementation
Mads Kiilerich <mads@kiilerich.com>
parents: 10998
diff changeset
    13
- ``<hg.exe-dir>\hgrc.d\*.rc`` (unless mercurial.ini found)
6a539853d4c0 help config: update windows documentation to match implementation
Mads Kiilerich <mads@kiilerich.com>
parents: 10998
diff changeset
    14
- ``<hg.exe-dir>\mercurial.ini``
9785
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    15
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    16
On Unix, these files are read:
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    17
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    18
- ``<repo>/.hg/hgrc``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    19
- ``$HOME/.hgrc``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    20
- ``/etc/mercurial/hgrc``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    21
- ``/etc/mercurial/hgrc.d/*.rc``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    22
- ``<install-root>/etc/mercurial/hgrc``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    23
- ``<install-root>/etc/mercurial/hgrc.d/*.rc``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    24
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    25
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
    26
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
    27
and followed by ``name = value`` entries::
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    28
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    29
  [ui]
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    30
  username = Firstname Lastname <firstname.lastname@example.net>
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    31
  verbose = True
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    32
10998
2d4225faa61a help: config.txt typo
Matt Mackall <mpm@selenic.com>
parents: 9999
diff changeset
    33
The above entries will be referred to as ``ui.username`` and
9785
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    34
``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
    35
description of the possible configuration values:
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    36
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    37
- on Unix-like systems: ``man hgrc``
b52f0f221325 help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff changeset
    38
- online: http://www.selenic.com/mercurial/hgrc.5.html