Take the default Mercurial.ini file found at in the Mercurial executable install directory (C:\Program Files\Mercurial\Mercurial.ini on my machine) and copy it to your user home dir (C:\Documents and Settings\myName on winXP).
Windows 7:
sample.hgrc到 Mercurial.ini
there is no default .ini, you will need to create a new one in C:\Users\myName.
Then edit that .ini file. Find this area. The username needs an email set. It will be blank--add your email name here.
linux:
拷贝一份sample.hgrc到~/.hgrc
修改如下: [ui] ; editor used to enter commit logs, etc. Most text editors will work. editor = notepad username = userEmail@domain.com