允许拉入存储库但阻止克隆Apache服务存储库

时间:2013-03-11 09:57:32

标签: mercurial hgweb

我有一个工作流程,我需要允许用户从Apache托管的mercurial存储库中提取新的更改,但阻止他们进行新的克隆。

关于如何做到这一点的任何想法?

由于

  • 使用hgweb.wsgi使用apache vhost(接受变通办法)来提供存储库

2 个答案:

答案 0 :(得分:2)

clone只是init,后跟pull,因此您无法停止克隆,也无法打破拉力。

答案 1 :(得分:1)

最简单的方法是通过常规HTTP发布捆绑包,并允许用户下载和应用这些捆绑包。见hg help bundle

Generate a compressed changegroup file collecting changesets not known to
be in another repository.

The bundle file can then be transferred using conventional means and
applied to another repository with the unbundle or pull command. This is
useful when direct push and pull are not available or when exporting an
entire repository is undesirable.

Applying bundles preserves all changeset contents including permissions,
copy/rename information, and revision history.