如何在Mercurial中设置用户名?
运行Mercurial时,我遇到以下错误:如何在Mercurial中设置用户名?,mercurial,Mercurial,运行Mercurial时,我遇到以下错误: t3@des:gem5$ hg qnew my_p.diff abort: no username supplied (see "hg help config") hg帮助配置显示: The configuration files use a simple ini-file format. A configuration file consists of sections, led by a "[section]" header and follow
t3@des:gem5$ hg qnew my_p.diff
abort: no username supplied (see "hg help config")
hg帮助配置
显示:
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 <firstname.lastname@example.net>
verbose = True
配置文件使用简单的ini文件格式。配置文件
由节组成,以“[节]”标题开头,后跟“名称”=
“价值”条目:
[用户界面]
用户名=Firstname Lastname
详细=正确
但是ini文件在哪里?假设您在linux上,在您的主目录或相关的存储库目录中创建.hgrc文件 dirunderhgcontrol/.hg/.hgrc
将您在问题中陈述的信息(ui、用户名、详细信息…)添加到新文件中,然后尝试一下。假设您在linux上,在您的主目录或相关的存储库目录中创建.hgrc文件 dirunderhgcontrol/.hg/.hgrc
将您在问题中陈述的信息(ui、用户名、详细信息…)添加到新文件中,然后试一试。
hg help config
默认情况下,这些文件不存在,您必须创建
适当的配置文件:全局配置,如
用户名设置通常放在
“%USERPROFILE%\mercurial.ini”或“$HOME/.hgrc”和本地配置
放入每个存储库“/.hg/hgrc”文件中
hg帮助配置
默认情况下,这些文件不存在,您必须创建
适当的配置文件:全局配置,如
用户名设置通常放在
“%USERPROFILE%\mercurial.ini”或“$HOME/.hgrc”和本地配置
放入每个存储库“/.hg/hgrc”文件中