Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting username in Mercurial .hgrc file

Tags:

mercurial

hgrc

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?

like image 803
kamek Avatar asked Nov 21 '11 09:11

kamek


People also ask

Where is HGRC?

hgrc of the user the web server runs as. As mentioned in hg help config , you have local, global, per-user, and system hgrc files. This user is second on the weekly GitLab leaderboard.


1 Answers

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.

like image 121
Martin Geisler Avatar answered Oct 27 '22 02:10

Martin Geisler