在 Hg 中按名称存储远程路径
在 git 中,我可以 git remote add x http://...
然后 git pull x
我怎样才能在 hg 中做到这一点?
我被告知将以下内容添加到 .hgrc
:
[paths]
x = http://...
所以我将上述内容添加到 /path/to/repo/.hgrc
然后尝试 hg pull x 并出现以下错误:
abort: repository x not found!
其中 x 为 mozilla
且 http://
为 http://hg.mozilla.org/labs/jetpack-sdk/
In git I can git remote add x http://...
then git pull x
how can I do this in hg?
I was told to add the following to .hgrc
:
[paths]
x = http://...
so I added the above to /path/to/repo/.hgrc
then tried hg pull x
and got the following error:
abort: repository x not found!
where x was mozilla
and http://
was http://hg.mozilla.org/labs/jetpack-sdk/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
hgrc 文件位于
/path/to/repo/.hg/hgrc
中(请注意,名称前面没有句点)。看起来您在存储库的根目录中创建了一个名为 .hgrc 的文件,而 Mercurial 无法识别该文件。您还可以执行
hg clone http://hg.mozilla.org/labs/jetpack-sdk
,这将创建一个本地存储库并一步提取其所有文件。The hgrc file is in
/path/to/repo/.hg/hgrc
(note there's no period in front of the name). It looks like you created a file called .hgrc in the root of the repository, which Mercurial doesn't recognize.You could also do
hg clone http://hg.mozilla.org/labs/jetpack-sdk
which would create a local repository and pull all of its files in one step.