Mercurial > hg
comparison mercurial/help/config.txt @ 14460:d5f616132c10
doc: improve merge between hgrc.5 and config help topic
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Mon, 30 May 2011 11:15:25 +0200 |
parents | c62b3b74f1d2 |
children | e9e4e9ab62bd |
comparison
equal
deleted
inserted
replaced
14459:323c11dad9c6 | 14460:d5f616132c10 |
---|---|
1 The Mercurial system uses a set of configuration files to control | |
2 aspects of its behavior. | |
3 | |
4 The configuration files use a simple ini-file format. A configuration | |
5 file consists of sections, led by a ``[section]`` header and followed | |
6 by ``name = value`` entries:: | |
7 | |
8 [ui] | |
9 username = Firstname Lastname <firstname.lastname@example.net> | |
10 verbose = True | |
11 | |
12 The above entries will be referred to as ``ui.username`` and | |
13 ``ui.verbose``, respectively. See the Syntax section below. | |
14 | |
15 Files | |
16 ----- | |
17 | |
1 Mercurial reads configuration data from several files, if they exist. | 18 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`` (unless regkey or hgrc.d\ or mercurial.ini found) | |
12 - ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` (unless hgrc.d\ or mercurial.ini found) | |
13 - ``<hg.exe-dir>\hgrc.d\*.rc`` (unless mercurial.ini found) | |
14 - ``<hg.exe-dir>\mercurial.ini`` | |
15 | |
16 On Unix, these files are read: | |
17 | |
18 - ``<repo>/.hg/hgrc`` | |
19 - ``$HOME/.hgrc`` | |
20 - ``/etc/mercurial/hgrc`` | |
21 - ``/etc/mercurial/hgrc.d/*.rc`` | |
22 - ``<install-root>/etc/mercurial/hgrc`` | |
23 - ``<install-root>/etc/mercurial/hgrc.d/*.rc`` | |
24 | |
25 These files do not exist by default and you will have to create the | 19 These files do not exist by default and you will have to create the |
26 appropriate configuration files yourself: global configuration like | 20 appropriate configuration files yourself: global configuration like |
27 the username setting is typically put into | 21 the username setting is typically put into |
28 ``%USERPROFILE%\mercurial.ini`` or ``$HOME/.hgrc`` and local | 22 ``%USERPROFILE%\mercurial.ini`` or ``$HOME/.hgrc`` and local |
29 configuration is put into the per-repository ``<repo>/.hg/hgrc`` file. | 23 configuration is put into the per-repository ``<repo>/.hg/hgrc`` file. |
30 | 24 |
31 If there is a per-repository configuration file which is not owned by | |
32 the active user, Mercurial will warn you that the file is skipped:: | |
33 | |
34 not trusting file <repo>/.hg/hgrc from untrusted user USER, group GROUP | |
35 | |
36 If this bothers you, the warning can be silenced (the file would still | |
37 be ignored) or trust can be established. Use one of the following | |
38 settings, the syntax is explained below: | |
39 | |
40 - ``ui.report_untrusted = False`` | |
41 - ``trusted.users = USER`` | |
42 - ``trusted.groups = GROUP`` | |
43 | |
44 The configuration files for Mercurial use a simple ini-file format. A | |
45 configuration file consists of sections, led by a ``[section]`` header | |
46 and followed by ``name = value`` entries:: | |
47 | |
48 [ui] | |
49 username = Firstname Lastname <firstname.lastname@example.net> | |
50 verbose = True | |
51 | |
52 The above entries will be referred to as ``ui.username`` and | |
53 ``ui.verbose``, respectively. Please see the hgrc man page for a full | |
54 description of the possible configuration values: | |
55 | |
56 - on Unix-like systems: ``man hgrc`` | |
57 - online: http://www.selenic.com/mercurial/hgrc.5.html | |
58 | |
59 Files | |
60 ----- | |
61 | |
62 Mercurial reads configuration data from several files, if they exist. | |
63 The names of these files depend on the system on which Mercurial is | 25 The names of these files depend on the system on which Mercurial is |
64 installed. ``*.rc`` files from a single directory are read in | 26 installed. ``*.rc`` files from a single directory are read in |
65 alphabetical order, later ones overriding earlier ones. Where multiple | 27 alphabetical order, later ones overriding earlier ones. Where multiple |
66 paths are given below, settings from earlier paths override later | 28 paths are given below, settings from earlier paths override later |
67 ones. | 29 ones. |
72 particular repository. This file is not version-controlled, and | 34 particular repository. This file is not version-controlled, and |
73 will not get transferred during a "clone" operation. Options in | 35 will not get transferred during a "clone" operation. Options in |
74 this file override options in all other configuration files. On | 36 this file override options in all other configuration files. On |
75 Unix, most of this file will be ignored if it doesn't belong to a | 37 Unix, most of this file will be ignored if it doesn't belong to a |
76 trusted user or to a trusted group. See the documentation for the | 38 trusted user or to a trusted group. See the documentation for the |
77 trusted_ section below for more details. | 39 Trusted section below for more details. |
78 | 40 |
79 | (Unix) ``$HOME/.hgrc`` | 41 | (Unix) ``$HOME/.hgrc`` |
80 | (Windows) ``%USERPROFILE%\.hgrc`` | 42 | (Windows) ``%USERPROFILE%\.hgrc`` |
81 | (Windows) ``%USERPROFILE%\Mercurial.ini`` | 43 | (Windows) ``%USERPROFILE%\Mercurial.ini`` |
82 | (Windows) ``%HOME%\.hgrc`` | 44 | (Windows) ``%HOME%\.hgrc`` |
104 parent directory of the **hg** executable (or symlink) being run. For | 66 parent directory of the **hg** executable (or symlink) being run. For |
105 example, if installed in ``/shared/tools/bin/hg``, Mercurial will look | 67 example, if installed in ``/shared/tools/bin/hg``, Mercurial will look |
106 in ``/shared/tools/etc/mercurial/hgrc``. Options in these files apply | 68 in ``/shared/tools/etc/mercurial/hgrc``. Options in these files apply |
107 to all Mercurial commands executed by any user in any directory. | 69 to all Mercurial commands executed by any user in any directory. |
108 | 70 |
109 | (Windows) ``<install-dir>\Mercurial.ini`` | 71 | (Windows) ``<install-dir>\Mercurial.ini`` **or** |
110 | (Windows) ``<install-dir>\hgrc.d\*.rc`` | 72 | (Windows) ``<install-dir>\hgrc.d\*.rc`` **or** |
111 | (Windows) ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` | 73 | (Windows) ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` |
112 | 74 |
113 Per-installation/system configuration files, for the system on | 75 Per-installation/system configuration files, for the system on |
114 which Mercurial is running. Options in these files apply to all | 76 which Mercurial is running. Options in these files apply to all |
115 Mercurial commands executed by any user in any directory. Registry | 77 Mercurial commands executed by any user in any directory. Registry |