Mercurial prüft auf eine Anzahl von Konfigurationsdateien mit einer bestimmten Priorität. Auf diese Weise können Sie globale, benutzerspezifische und repositoryspezifische Einstellungen vornehmen. Mercurial Version> = 1.4 hat einen hg help config
Befehl, der dies in einem schönen Überblick beschreibt:
$ hg help config
Configuration Files
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:
- "<repo>\.hg\hgrc"
- "%USERPROFILE%\.hgrc"
- "%USERPROFILE%\Mercurial.ini"
- "%HOME%\.hgrc"
- "%HOME%\Mercurial.ini"
- "C:\Mercurial\Mercurial.ini"
- "HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial"
- "<install-dir>\Mercurial.ini"
On Unix, these files are read:
- "<repo>/.hg/hgrc"
- "$HOME/.hgrc"
- "/etc/mercurial/hgrc"
- "/etc/mercurial/hgrc.d/*.rc"
- "<install-root>/etc/mercurial/hgrc"
- "<install-root>/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 <[email protected]>
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
Sie Ihre aktuellen Einstellungen mit hg showconfig
auflisten können.
Ehrfurcht, super - genau das habe ich gesucht. Vielen Dank. –
Wow, ich hatte keine Ahnung, dass es existiert. Nett. –
Hrm, das wäre ja echt cool ... Aber es geht nicht mit hg 1.3.1 oder 1.4.1 ... Und das greppen des hg source tree (1.4.1 + 7-4ddfad7ebd98) für '% import' dreht sich nicht irgendwas. Also ... Wo hast du das gefunden? –