2012-02-21 80 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.

相關問題