每次我做一个commit
,我得到....
abort:默认存储库未配置!提示:请参阅路径部分在"hg help config"
(代码255)
. .所以我输入hg help config
,它显然没有真正的"路径"部分。它确实有一个文件部分讨论配置文件,说…
On Windows, the following files are consulted:
- "<repo>/.hg/hgrc" (per-repository)
- "%USERPROFILE%.hgrc" (per-user)
- "%USERPROFILE%Mercurial.ini" (per-user)
- "%HOME%.hgrc" (per-user)
- "%HOME%Mercurial.ini" (per-user)
- "<install-dir>Mercurial.ini" (per-installation)
- "<install-dir>hgrc.d*.rc" (per-installation)
- "HKEY_LOCAL_MACHINESOFTWAREMercurial" (per-installation)
- "<internal>/default.d/*.rc" (defaults)
…所以我看看我的/.hg/hgrc
文件,我看到:
[paths] default = M:WorkspacesAziGamma
,这是我的父文件夹路径。
我仍然不清楚我应该如何解决这个错误。
正如hg help config
所说:
"默认"
如果没有指定源,则在拉取时使用的目录或URL。默认设置为当前存储库所在的存储库克隆。
这意味着你应该在M:WorkspacesAziGamma
中有原始存储库,但它不在那里,因此你收到的错误。
如何解决错误:
-
如果您已经从
M:WorkspacesAziGamma
克隆了存储库,那么请确保原始主存储库仍在该路径中。如果您已经移动了它,请将hgrc
文件中的path替换为新位置。 -
如果你还没有克隆你的存储库,你没有任何原始的主存储库(或者你克隆了,但你不再需要它)-这意味着你不打算
push/pull
-然后从你的hgrc
文件中删除default = M:WorkspacesAziGamma
行