Setting username in Mercurial .hgrc file
18,220
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 videos on Youtube
![kamek](https://i.stack.imgur.com/2HbzK.jpg?s=256&g=1)
Author by
kamek
Updated on June 04, 2022Comments
-
kamek about 2 years
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?
-
Ishbir over 12 yearsCould be some typo on your part. Please verify that
cat ~/.hgrc
(copy-paste that to a shell) produces the necessary config data. Update your question with the (appropriately anonimized) output. -
Paul S over 12 years@Adam Mercurial.ini is Windows only.
-
Adam Houldsworth over 12 years@PaulS Yeah I suspected as much :-(
-
daniel kullmann over 12 yearsWhat is the output of
hg.exe showconfig | grep ui
? -
César over 12 yearsDoes
hg commit -u username -m "msg"
works? -
kamek over 12 yearsSorry for the delay -- I currently have not internet access on the computer that I have been setting up Mercurial. Well the problem is "fixed", in that restarting my computer (for the first time in a month or so) seems to have fixed the problem (however, the reliability of this is unknown).
-
Martin Geisler over 12 years@danielkullmann: just a small note: instead of using
grep
(which is normally not there on Windows), then just dohg showconfig ui
to get the settings from the[ui]
section.
-