tags:

views:

148

answers:

3

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)

A: 

AFAIK, the files are not created by default. For storing the login IDs, it's usually a good idea to do what you did, especially if you have a different username for each project you work on.

Otherwise, you could create a Mercurial.ini file under C:\Documents and Settings\<user name>\ (as you are using Windows XP) or under C:\Users\<user name> (if you're using Windows Vista or Windows 7)

susmits
+4  A: 

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.

Ry4an
A: 

If you install TortoiseHg (which includes Mercurial) it will create the ini-file.

Laurens Holst