2012-02-21 58 views
1

当运行水银我得到这个错误:如何在Mercurial中设置我的用户名?

[email protected]:gem5$ hg qnew my_p.diff 
abort: no username supplied (see "hg help config") 

hg help config说:

The configuration files use a simple ini-file format. A configuration file 
consists of sections, led by a "[section]" header and followed by "name = 
value" entries: 

    [ui] 
    username = Firstname Lastname <[email protected]> 
    verbose = True 

但是哪里是ini文件?

回答

3

假设你在Linux上,创建在任何你的home目录或在有关存储库目录的.hgrc文件,

dirunderhgcontrol/.hg/.hgrc

添加信息(UI,用户名,详细......),你在说你的问题到新文件,然后尝试一下。

5

hg help config

These files do not exist by default and you will have to create the appropriate configuration files yourself: global configuration like the username setting is typically put into "%USERPROFILE%\mercurial.ini" or "$HOME/.hgrc" and local configuration is put into the per-repository "/.hg/hgrc" file.

相关问题