4
votes

I have a global ignore pattern set up in Tortoise SVN which is mostly exactly what I want. But sometime I want to add a folder and all its contents to SVN regardless of the pattern. In particular I do this when I am creating an 'external' folder that will include built files such as .libs and .dlls which would normally be ignored.

At the moment when I need to do this, I go to TortoiseSVN->Settings and remove the global ignore pattern. I then commit the files and then add the global ignore pattern back again.

Is there a simpler way to do this?

3

3 Answers

4
votes

Not that I'm aware of.

However, if the svn command line client isn't affected by TortoiseSVN's global ignore pattern, you could use it to start tracking files.

Be as it may, I wouldn't worry about that. Because there's a thing you should consider.

You see, in my opinion, using TortoiseSVN's global ignore pattern smells: you're using a local-only untracked ignore list, meaning that whoever checks out your code will be able to commit the wrong things.

Granted, Subversion's svn:ignore thing for ignoring files is moronic at best, but at least it's versioned.

As a final thought, I don't know about you, but I highly value having a "plug-and-play" development environment, where the number of steps to make the new guy productive is as reduced as I can possibly make it. You know, automated builds, automated tests etc.

And allowing the new guy to commit whatever .dlls, .libs and .exes doesn't exactly move the ball forward.

2
votes

Using Tortoise and assuming your project is already in SVN (if not, seed the SVN).
1. find your project in repo browser.
2. create folder... by right clicking the node where the parent should be. Ex: bin.
3. run svn update on your local checkout path.
4. place whatever file you want in that folder and commit

This will override the Tortoise global ignores just for that project. cheers.

1
votes

There's another approach, using the command line. It's not using Tortoise directly, though Tortoise does install the command line clients too, so it may still be a possibility.

From the command line run:

svn status --no-ignore

to ignore the global ignores.