Setting username in Mercurial .hgrc file

hgrcmercurial

I have been browsing SO and Google for a solution to my basic problem, and so far I have had no luck.

I am brand new to Mercurial and have just installed it on my Mac. I am using it for personal version control and will not be communicating with a central server (yet).

When I try to commit files, I get abort: no username supplied (see "hg help config"). The common solution to this problem is putting the following in ~/.hgrc

[ui]
username = Firstname Lastname <firstname.lastname@example.net>

which I have done, but the error remains. It just won't read the file. Any suggestions?

Best Answer

For future reference: use

$ hg showconfig ui --debug

to see the settings from the [ui] section and to see the files Mercural reads for configuration settings. That should help you along if you ever have to debug such a case again.

Related Topic