【问题标题】:How to exclude a specific folder from ignored list in .hgignore如何从 .hgignore 中的忽略列表中排除特定文件夹
【发布时间】:2014-10-02 14:24:05
【问题描述】:

我的源代码树中有一些临时文件夹。我在 .hgignore 中忽略了它们,如下所示

temp/

它忽略所有临时文件夹,例如

a/temp
b/temp
a/c/temp
b/d/temp

但我希望在存储库中包含一个特定的临时文件夹,例如“a/c/temp”。所以我将它排除在 .hgignore 中,如下所示。

!a/c/temp
/temp

但它不起作用。 “a/c/temp”文件夹仍然被忽略。 有什么想法吗?

【问题讨论】:

标签: mercurial hgignore


【解决方案1】:

你需要这样的东西(Negative Lookahead):

syntax: regexp
^(?!a/c).*/temp

如果您想排除更多目录,例如 b/d/temp

syntax: regexp
^(?!a/c|b/d).*/temp

希望对你有帮助。

【讨论】:

    猜你喜欢
    • 2019-05-05
    • 2021-08-15
    • 1970-01-01
    • 1970-01-01
    • 2018-05-18
    • 1970-01-01
    • 2015-07-30
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多