开发者

how to add a dot-directory to mercurials hgignore

I have used mercurial for some time now and never had any problems using hgignore.

Now I have created a new project using eclipse, which added a .metadata directory.

I seem to be unable to ignore the .metadata.

nils@yavin $ hg status
? .metadata/.mylyn/repositories.xml.zip
? .metadata/.plugins/org.eclipse.core.resources/.history/37/509db4063df7001f14dbbfe704ff2c4e
...

My .hgignore looks like this:

syntax: regexp
/\.metadata/.*
\.metadata/.*开发者_运维问答
glob:.metadata/*
glob:.metadata/.mylyn/repositories.xml.zip

As you can see, I tried some things... I even tried adding one file directly, but it did not work.

Is there any magic involved when dealing with dot-directories? Or am I simply stupid today?


Just remove everything and leave:

glob:.metadata/*

The first line syntax:regexp in your .hgignore is making hg treat all subsequent lines as regex, including the one with glob:.metadata/*

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜