Mercurial:启用git subrepo [英] Mercurial: enable git subrepo

查看:93
本文介绍了Mercurial:启用git subrepo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,默认情况下禁用此行为.该消息提示您检查帮助页面,但这无济于事,至少对我没有帮助.

Recently this behavior was disabled by default. The message prompts you to check the help page but it's not helpful, at least it didn't help me.

 "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中添加以下内容:

I assumed it was adding the following to the project's hgrc:

[subrepos]
git:allowed

但是它给出了一个解析错误.有人知道正确的格式吗?而且,为什么他们决定禁用此功能?每次结帐该项目时,我都必须进行更改吗?

But it gives a parsing error. Does anyone know the right format? And also, why they decided to disable this? Each time I checkout this project I'll have to make this change?

推荐答案

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

In your .hgrc file, you must add:

[subrepos]
git:allowed = true

这篇关于Mercurial:启用git subrepo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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