author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
Thu, 12 Aug 2010 19:38:31 +0900 | |
changeset 11793 | a03ce716495d |
parent 11408 | 534c69494918 |
child 13955 | 86b5cc1e8be8 |
permissions | -rw-r--r-- |
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 |
|
11408
534c69494918
Explain trust near hgrc in config help
timeless <timeless@gmail.com>
parents:
11016
diff
changeset
|
25 |
If there is a per-repository configuration file which is not owned by |
534c69494918
Explain trust near hgrc in config help
timeless <timeless@gmail.com>
parents:
11016
diff
changeset
|
26 |
the active user, Mercurial will warn you that the file is skipped:: |
534c69494918
Explain trust near hgrc in config help
timeless <timeless@gmail.com>
parents:
11016
diff
changeset
|
27 |
|
534c69494918
Explain trust near hgrc in config help
timeless <timeless@gmail.com>
parents:
11016
diff
changeset
|
28 |
not trusting file <repo>/.hg/hgrc from untrusted user USER, group GROUP |
534c69494918
Explain trust near hgrc in config help
timeless <timeless@gmail.com>
parents:
11016
diff
changeset
|
29 |
|
534c69494918
Explain trust near hgrc in config help
timeless <timeless@gmail.com>
parents:
11016
diff
changeset
|
30 |
If this bothers you, the warning can be silenced (the file would still |
534c69494918
Explain trust near hgrc in config help
timeless <timeless@gmail.com>
parents:
11016
diff
changeset
|
31 |
be ignored) or trust can be established. Use one of the following |
534c69494918
Explain trust near hgrc in config help
timeless <timeless@gmail.com>
parents:
11016
diff
changeset
|
32 |
settings, the syntax is explained below: |
534c69494918
Explain trust near hgrc in config help
timeless <timeless@gmail.com>
parents:
11016
diff
changeset
|
33 |
|
534c69494918
Explain trust near hgrc in config help
timeless <timeless@gmail.com>
parents:
11016
diff
changeset
|
34 |
- ``ui.report_untrusted = False`` |
534c69494918
Explain trust near hgrc in config help
timeless <timeless@gmail.com>
parents:
11016
diff
changeset
|
35 |
- ``trusted.users = USER`` |
534c69494918
Explain trust near hgrc in config help
timeless <timeless@gmail.com>
parents:
11016
diff
changeset
|
36 |
- ``trusted.groups = GROUP`` |
534c69494918
Explain trust near hgrc in config help
timeless <timeless@gmail.com>
parents:
11016
diff
changeset
|
37 |
|
9785
b52f0f221325
help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
38 |
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
|
39 |
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
|
40 |
and followed by ``name = value`` entries:: |
b52f0f221325
help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
41 |
|
b52f0f221325
help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
42 |
[ui] |
b52f0f221325
help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
43 |
username = Firstname Lastname <firstname.lastname@example.net> |
b52f0f221325
help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
44 |
verbose = True |
b52f0f221325
help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
45 |
|
10998 | 46 |
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
|
47 |
``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
|
48 |
description of the possible configuration values: |
b52f0f221325
help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
49 |
|
b52f0f221325
help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
50 |
- on Unix-like systems: ``man hgrc`` |
b52f0f221325
help: add "hg help config" topic
Martin Geisler <mg@lazybytes.net>
parents:
diff
changeset
|
51 |
- online: http://www.selenic.com/mercurial/hgrc.5.html |