开发者

How do I ignore a file/directory with a space in it with a (tortoise) SVN ignore pattern?

I'm trying to add the directory with a space in it:

Static Debug

to my SVN ignore pattern.

However, spaces are used to separate di开发者_StackOverflow中文版fferent directories (so the above ignore pattern would be interpreted as two files to ignore -- Static and Debug)

I've tried adding

Static%20Debug

and

"Static Debug"

and

Static\ Debug

with no luck

And apparently I can't ignore by regular expression.

Anyone have any idea?


Related to Doug T.'s Answer, I played around with this a bit.

Instead of using ?, you can specify an exclusion range with [] by putting a ^ at the front.

ignore[^A-Za-z0-9]this

If I have an "ignore this" and a "ignore0this", the one with the space will be ignored, but not the one with the 0.


I found this documentation in the tortoise manual. According to it

[...]

Matches any one of the characters enclosed in the square brackets. Within the brackets, a pair of characters separated by “-” matches any character lexically between the two. For example [AGm-p] matches any one of A, G, m, n, o or p.

So I can simply do

Static[ ]Debug 

which works

Ok that actually DOESN'T WORK for whitespace in my version of Tortoise

What works is using

?

Matches any single character.

which lets me do

Static?Debug

which unfortunately also matches stuff like StaticADebug. But this is good enough to do the trick.


As far as I know, it's a newline separated list. It even says so when you hover the mouse on the text box. I've just tried the name as-is and it works as expected:

Static Debug

Edit:

How do I ignore a file/directory with a space in it with a (tortoise) SVN ignore pattern?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜