Mercurial"默认推送未找到!"?

sme*_*eeb 3 mercurial dvcs

我在Windows 7机器上安装了Mercurial.我知道这是因为当我输入时hg --version我得到:

Mercurial Distributed SCM (version 2.5.2)
(see http://mercurial.selenic.com for more information)

Copyright (C) 2005-2012 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Run Code Online (Sandbox Code Playgroud)

我刚刚将一些代码提交到本地仓库hg commit -m "Made some changes.".

然后我输入hg push并获取:

pushing to default-push
abort: repository default-push not found!
Run Code Online (Sandbox Code Playgroud)

我的C:\Users\myuser\.hg\hgrc文件看起来像:

[trusted]
users = myuser
Run Code Online (Sandbox Code Playgroud)

这里发生了什么?

Mar*_*ler 6

您需要配置默认路径.你通过在.hg\hgrc文件中有这样的部分来做到这一点:

[paths]
default = http://somewhere/to/push/to
Run Code Online (Sandbox Code Playgroud)

default路径将用于hg pushhg pull.default-push如果要使用其他路径,也可以配置路径hg push.请参阅hg help paths有关此内容的更多帮助.