Setting username in Mercurial .hgrc file

kamek picture kamek · Nov 21, 2011 · Viewed 18.2k times · Source

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 <[email protected]>

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

Answer

Martin Geisler picture Martin Geisler · Dec 1, 2011

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.