【问题标题】:Allow pull in repository but block cloning for Apache served repository允许拉入存储库,但阻止克隆 Apache 服务的存储库
【发布时间】:2013-03-11 09:57:32
【问题描述】:

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

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

谢谢

  • 使用 hgweb.wsgi 通过 apache vhost 为存储库提供服务(已接受解决方法)

【问题讨论】:

    标签: mercurial hgweb


    【解决方案1】:

    clone 只是一个 init 后跟一个 pull,所以你不能停止克隆而没有破坏 pull。

    【讨论】:

    • 谢谢,这似乎是真的......但是,下面的答案更接近解决方法
    • 当然。您应该编辑您的问题,使其足够广泛,可以将其作为实际答案包含在内。正如所写的那样,放置 .bundle 文件不再是“hgweb.wsgi”托管存储库。
    • 更新问题以明确允许解决方法,但始终欢迎任何解决方法。已经赞成你的回答作为一种给予信任的方式,但以你的专家分数,我现在怀疑这对你很重要:) 干杯
    • 是的,我不担心这些问题(但谢谢)我只是在努力确保搜索总能找到以前的好问题
    【解决方案2】:

    最简单的方法是通过常规 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.
    

    【讨论】:

    • 这不是也允许用户通过创建一个新的 repo 并应用所有的包来有效地克隆吗?
    • 接受这个答案,因为可以删除历史捆绑包,以便只有最新的捆绑包可用
    猜你喜欢
    • 1970-01-01
    • 2012-08-16
    • 2021-12-31
    • 1970-01-01
    • 2011-09-19
    • 2020-02-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多