Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial win instal: no ini files

Tags:

mercurial

I installed mercurial 1.5.1 on win xp but the files listed in hg help config, were not created.
Namely:
%USERPROFILE%.hgrc (is that a valid windows file name?)
%USERPROFILE%\Mercurial.ini
\Mercurial\Mercurial.ini
C:\Mercurial\Mercurial.ini (no such directory altogether)
%HOME%.hgrc (what is this directory)
%HOME%\Mercurial.ini
HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial (no registry created)
.hg\hgrc (i had to create this file manually to solve my problem)

like image 772
Marwan Avatar asked Apr 17 '10 12:04

Marwan


People also ask

Where is my Mercurial ini file?

Mercurial on Windows has a three-tier configuration system. A site-wide configuration file in C:\Program Files\TortoiseHg\Mercurial. ini This file is read first and thus has the lowest priority. A per-user configuration file in C:\Documents and Settings\username\Mercurial.

Where is HGRC file on Windows?

hg/hgrc file. Global configuration like the username setting is typically put into: %USERPROFILE%\mercurial. ini (on Windows)


1 Answers

They're not supposed to be automatically created. They're places you can put configuration information depending on what scope you want it to have:

C:\Mercurial\Mercurial.ini - If you choose to create this whatever you put in it affects all users on the systme

%USERPROFILE%\Mercurial.ini - If you choose to create this whatever you put in it affects only you, but in every repo with with you interact

((repository root))\.hg\hgrc - If you choose to create this whatever you put in it affects only the repository in which you placed it

So, it's all about scope. Something like enabling an extension might be best done system global in C:\Mercurial. Something like setting your username is probably best done only for you, in your %USERPROFILE%\Mercurial.ini. Saving a password for a repository (if done at all) probably goes inside that repos .hg/hgrc file.

As explained by Daniel in the comments, %USERPROFILE% is the expansion of an environment variable. That's necessary because your home directory location differs depending on what version of windows you have, how your administrator configured it, and your name.

like image 181
Ry4an Brase Avatar answered Oct 30 '22 09:10

Ry4an Brase