hgignore: help ignoring all files but certain ones

后端 未结 3 1893
后悔当初
后悔当初 2020-12-02 15:29

I need an .hgdontignore file :-) to include certain files and exclude everything else in a directory. Basically I want to include only the .jar files in a particular directo

3条回答
  •  温柔的废话
    2020-12-02 16:12

    Anyone that wants to use negative lookaheads (or ?! in regex syntax) or any kind of back-referencing mechanism should be aware that Mercurial will fall back from google's RE2 to Python's re module for matching.

    RE2 is a non-backtracking engine that guarantees a run-time linear with the size of the input. If performance is important to you, that is if you have a big repository, you should consider sticking to more simple patterns that Re2 supports, which is why I think that the solution offered by Ryan.

提交回复
热议问题