将Merurial存储库克隆到远程主机 [英] Cloning mercurial repo to the remote host

查看:62
本文介绍了将Merurial存储库克隆到远程主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Mercurial支持将存储库以推送方式克隆到远程主机,但是新克隆的存储库不包含工作副本.是否有任何隐藏"选项可对这些克隆的存储库进行Mercury Call更新?

Mercurial supports push-style cloning of repositories to remote hosts, however newly cloned repositories don't contain working copies. Is there any 'hidden' option to make mercurial call update upon these cloned repos?

这里是一个例子:

1)hg init你好

1) hg init hello

2)hg clone hello ssh://somehost/hello

2) hg clone hello ssh://somehost/hello

ssh://somehost/hello仅包含.hg目录,为了填充工作副本,我必须在shell中执行以下命令:

ssh://somehost/hello only contains .hg directory and I have to execute the following command in the shell in order to fill the working copy:

3)ssh somehost'cd hello&& hg update'

3) ssh somehost 'cd hello && hg update'

有什么办法可以避免步骤3)?

Is there any way to avoid step 3) ?

推荐答案

您可以在接收方创建一个钩子.将以下部分添加到您的repo/.hg/hgrc

You can create a hook on the receiving side. Add the following section to your repo/.hg/hgrc

[hooks]
changegroup = hg update

应该这样做.请注意,钩子不会被克隆.

That should do it. Note that hooks are not cloned.

这篇关于将Merurial存储库克隆到远程主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆