diff --git a/help/config.txt b/help/config.txt new file mode 100644 --- /dev/null +++ b/help/config.txt @@ -0,0 +1,37 @@ +Mercurial reads configuration data from several files, if they exist. +Below we list the most specific file first. + +On Windows, these configuration files are read: + +- ``\.hg\hgrc`` +- ``%USERPROFILE%\.hgrc`` +- ``%USERPROFILE%\Mercurial.ini`` +- ``%HOME%\.hgrc`` +- ``%HOME%\Mercurial.ini`` +- ``C:\Mercurial\Mercurial.ini`` +- ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial`` +- ``\Mercurial.ini`` + +On Unix, these files are read: + +- ``/.hg/hgrc`` +- ``$HOME/.hgrc`` +- ``/etc/mercurial/hgrc`` +- ``/etc/mercurial/hgrc.d/*.rc`` +- ``/etc/mercurial/hgrc`` +- ``/etc/mercurial/hgrc.d/*.rc`` + +The configuration files for Mercurial use a simple ini-file format. A +configuration file consists of sections, led by a ``[section]`` header +and followed by ``name = value`` entries:: + + [ui] + username = Firstname Lastname + verbose = True + +This above entries will be referred to as ``ui.username`` and +``ui.verbose``, respectively. Please see the hgrc man page for a full +description of the possible configuration values: + +- on Unix-like systems: ``man hgrc`` +- online: http://www.selenic.com/mercurial/hgrc.5.html diff --git a/mercurial/help.py b/mercurial/help.py --- a/mercurial/help.py +++ b/mercurial/help.py @@ -80,6 +80,7 @@ def loaddoc(topic): return loader helptable = ( + (["config"], _("Configuration Files"), loaddoc('config')), (["dates"], _("Date Formats"), loaddoc('dates')), (["patterns"], _("File Name Patterns"), loaddoc('patterns')), (['environment', 'env'], _('Environment Variables'), loaddoc('environment')), diff --git a/tests/test-globalopts.out b/tests/test-globalopts.out --- a/tests/test-globalopts.out +++ b/tests/test-globalopts.out @@ -202,6 +202,7 @@ list of commands: additional help topics: + config Configuration Files dates Date Formats patterns File Name Patterns environment Environment Variables @@ -270,6 +271,7 @@ list of commands: additional help topics: + config Configuration Files dates Date Formats patterns File Name Patterns environment Environment Variables diff --git a/tests/test-help.out b/tests/test-help.out --- a/tests/test-help.out +++ b/tests/test-help.out @@ -95,6 +95,7 @@ list of commands: additional help topics: + config Configuration Files dates Date Formats patterns File Name Patterns environment Environment Variables @@ -159,6 +160,7 @@ use "hg -v help" to show aliases and glo additional help topics: + config Configuration Files dates Date Formats patterns File Name Patterns environment Environment Variables