mercurial: no username supplied (see “hg help config”)

mercurial: no username supplied (see “hg help config”)

在Ubuntu中使用mercurial命令行提交修改(hg commit)时,出现上述错误提示。出问题的原因大约是当前linux用户与mercurial中的用户不一致。修改方式比较简单:

修改本地库.hg/hgrc文件,根据实际用户信息加入以下配置即可:

[ui]
username=yxh <yxh@myvoipapp.com>
editor=vim

上述示例中,同时指定默认的编辑器采用vim。

Comments are closed.