Username setup in TortoiseHG
Asked Answered
H

3

9

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?

Harwill answered 28/6, 2010 at 13:22 Comment(3)
After setting the username close the commit dialogue and try to commit again. That fixed it for me.Featureless
@Milen: ...of course. Yeah, that worked. Submit it as an answer and I'll accept it.Harwill
@Milen: Thanks - you just saved my day! You should post it as an answer, so it can be marked green and more visible =)Arrowroot
F
11

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.

Featureless answered 16/7, 2010 at 19:41 Comment(0)
W
2

I couldn't find the hgrc file in my Windows 7 drive, so I just added the username to the mercurial.ini file.

[ui]  
username = Santiago Villafuerte

The file is found in:

C:\Users\<your_windows_username>

I am using the x64 Tortoise release.

Wolford answered 27/7, 2014 at 20:57 Comment(0)
Z
1

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).

Zworykin answered 29/6, 2010 at 13:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.