7

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 different 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?

Community
  • 1
  • 1
Doug T.
  • 64,223
  • 27
  • 138
  • 202

3 Answers3

4

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.

crashmstr
  • 28,043
  • 9
  • 61
  • 79
3

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.

Doug T.
  • 64,223
  • 27
  • 138
  • 202
  • Nice way to leverage the pattern matching brackets to do the job effectively. – Edwin Buck Jul 27 '11 at 15:45
  • @Edwin, I was wrong. [ ] didn't work. I must have confused my results with the ? test I did. I wish it DID work. Tortoise doesn't seem to provide anyway of escaping a space character and always sees it as a separator. – Doug T. Jul 27 '11 at 15:53
  • too bad. It would have been an elegant hack. Have you tried double and triple escaping the space? Sometimes the name gets evaluated in a shell, which strips the first backslash. I've had success in other tasks with items similar to Static\\\ Debug, etc. – Edwin Buck Jul 27 '11 at 15:58
  • Another item to consider is that maybe the double quotes need backslashes. Not that they should require them; but, perhaps the processing around the name isn't very careful in preserving them, and they get stripped along the way. – Edwin Buck Jul 27 '11 at 15:59
0

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:

enter image description here

Álvaro González
  • 142,137
  • 41
  • 261
  • 360
  • mine says "Separate the patters with a space." (if you do global ignore pattern) – crashmstr Jul 27 '11 at 16:21
  • @crashmstr - Weird... See my screen-shot. – Álvaro González Jul 27 '11 at 16:22
  • yes, you are in the *property* for something. That does indicate newline delimited. Not sure, but I think the original post is for global ignore patterns, and those are space delimited. – crashmstr Jul 27 '11 at 16:24
  • @crashmstr - You are right, I thought it was about editing the `svn:ignore` property of the parent directory, but the question clearly said *global ignore patterns* for all working copies. I misread it. – Álvaro González Jul 27 '11 at 16:50