如何在 Mercurial 中设置我的用户名?
运行 Mercurial 时,我收到此错误:
t3@des: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 文件在哪里?
When running Mercurial I get this error:
t3@des:gem5$ hg qnew my_p.diff
abort: no username supplied (see "hg help config")
the hg help config
says:
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
But where is that ini file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
假设您在 Linux 上,在您的主目录或相关存储库目录中创建 .hgrc 文件,
将您在问题中所述的信息(ui,用户名,详细...)添加到新文件中,然后尝试一下。
Assuming your on linux, create the .hgrc file in either your home directory or in the repository dir in question,
Add the info(ui, username, verbose...) you stated in your question to the new file and then give it a try.
hg 帮助配置
hg help config