git - Mercurial:启用 git subrepo

标签 git configuration mercurial

最近此行为默认被禁用。该消息提示您查看帮助页面,但这没有帮助,至少对我没有帮助。

 "subrepos"
    ----------

    This section contains options that control the behavior of the
    subrepositories feature. See also 'hg help subrepos'.

    Security note: auditing in Mercurial is known to be insufficient to
    prevent clone-time code execution with carefully constructed Git subrepos.
    It is unknown if a similar detect is present in Subversion subrepos. Both
    Git and Subversion subrepos are disabled by default out of security
    concerns. These subrepo types can be enabled using the respective options
    below.

    "allowed"
        Whether subrepositories are allowed in the working directory.

        When false, commands involving subrepositories (like 'hg update') will
        fail for all subrepository types. (default: true)

    "hg:allowed"
        Whether Mercurial subrepositories are allowed in the working
        directory. This option only has an effect if "subrepos.allowed" is
        true. (default: true)

    "git:allowed"
        Whether Git subrepositories are allowed in the working directory. This
        option only has an effect if "subrepos.allowed" is true.

        See the security note above before enabling Git subrepos. (default:
        false)

    "svn:allowed"
        Whether Subversion subrepositories are allowed in the working
        directory. This option only has an effect if "subrepos.allowed" is
        true.

        See the security note above before enabling Subversion subrepos.
        (default: false)

我假设它正在将以下内容添加到项目的 hgrc 中:

[subrepos]
git:allowed

但是它给出了解析错误。有谁知道正确的格式?而且,为什么他们决定禁用它?每次我 checkout 这个项目时,我都必须进行此更改吗?

最佳答案

在您的.hgrc 文件中,您必须添加:

[subrepos]
git:allowed = true

关于git - Mercurial:启用 git subrepo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49577952/

相关文章:

mercurial - MVN 发布 :prepare with Mercurial push FAIL

merge - Mercurial:执行 merge 时为 "no match found",如果我尝试剥离则为 "no node!"

git - 如何为 git 准备 Unity 项目(逐步)?

linux - 从补丁中移动的文件列表

.net - AppDomains 和 configSections

JavaFX - 如何保存用户设置/配置?

Mercurial:共享存储库而不将其放在服务器上?

git - SCM Maven插件配置时如何指定git标签?

Git 申请与我

spring - <context :include-filter> and <context:exclude-filter> work in Spring? 怎么办