开发者

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 use开发者_运维知识库rname 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?


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.


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜