您如何设置Mercurial用于提交的用户名? [英] How do you set the username that Mercurial uses for commits?
问题描述
当我在Mercurial中提交这样的内容时:
When I commit something in Mercurial like this:
hg commit -m "username question"
我看到以下输出:
No username found, using 'WindowsVistaAdmin@ChunkyMonkey' instead
ChunkyMonkey
是我的Windows计算机名称,显然WindowsVistaAdmin
是我在此计算机上登录的用户.
ChunkyMonkey
is my Windows machine name and obviously WindowsVistaAdmin
is the user that I am signed in as on this machine.
如何将用户名设置为更受人尊敬,或者至少更简洁?
How can I set the username to something more respectable, or, at least, more concise?
推荐答案
在您的~/.hgrc
(* nix)或mercurial.ini
(Windows)文件中:
In your ~/.hgrc
(*nix) or mercurial.ini
(Windows) file:
[ui]
username = First Last <email@address.com>
(mercurial.ini
在XP或更低版本的C:\Documents and Settings\[username]\
中,C:\Users\[username]\
在Vista或更高版本中.如果已安装TortoiseHg,也可以运行hgtk userconfig
.)
(mercurial.ini
is in C:\Documents and Settings\[username]\
for XP and lower, C:\Users\[username]\
for Vista and higher. You can also run hgtk userconfig
if you have TortoiseHg installed and do it that way.)
这篇关于您如何设置Mercurial用于提交的用户名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!