views:

133

answers:

2

I'm trying to set up a local repository with TortoiseHG. It's not linked to any remote repository; I just want to be able to manage changes on my own box.

Creating the repository went fine, but when I go to commit, I get an error:

Commit: Invalid username

Your username has not been configured.

Please configure your username and try again.

It very helpfully pops up a username configuration dialog. I fill in my username, and the rest of the options on that page just in case, and close it, try again... same error. I've given it a username, and it remembers it, but it still won't commit.

What am I missing?

A: 

To make it permanent, you should set it up in your hgrc file, in [ui] section, for example:

[ui]  
username = John Doe 

See http://www.selenic.com/mercurial/hgrc.5.html#files to get your hgrc location (probably in your home dir as Mercurial.ini).

cezio
+1  A: 

After setting the username, make sure you close the commit dialogue rather than simply trying again from the open form. Then try to commit again. That fixed it for me.

Milen A. Radev