Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Username setup in TortoiseHG

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?

like image 485
Mason Wheeler Avatar asked Jun 28 '10 13:06

Mason Wheeler


People also ask

How do you set a username in Heartgold?

If you specify a -u option to the hg commit command on the command line, followed by a username, this is always given the highest precedence. If you have set the HGUSER environment variable, this is checked next. If you create a file in your home directory called . hgrc, with a username entry, that will be used next.

How do you commit in TortoiseHg?

Commit. Explorer: right-clicking anywhere in the folder, or on the folder itself, and then selecting Hg Commit… Write a commit message, select the files you wish to commit, then press Commit. Your previous commit message will be in the message history drop-down, so you do not have to type it in again from scratch.

How do I update TortoiseHg?

1 Answer. Show activity on this post. Or in Workbench, right click on Tip and select Update. Or you can just right click, Update and select update to branchname / tip without worrying about the revision you are looking at.


2 Answers

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.

like image 118
Milen A. Radev Avatar answered Sep 20 '22 15:09

Milen A. Radev


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

like image 33
cezio Avatar answered Sep 20 '22 15:09

cezio