Well, it did. On one of my pet-projects called Sphoof, hosted over at Google Code, I had created directories for API documentation and log-output from the unit-tests, telling me if the unit tests were successful, the percentage of code coverage and violations of our coding standards. That’s great and all, but it doesn’t necessarily need to be in the repository. Nevertheless, I wanted those directories under the project’s main directory, to keep it all in the same place which makes it that much easier to find. Since they kept on popping up in svn stat, I decided to add the directories to the repository in a flash of humongous FAIL.
After committing all of the API docs and logs, which are bigger than the project itself, I figured I accidentally added them, but I actually wanted to ignore them instead. So, I emptied the directories and “svn propedit svn:ignore .” would have to do the trick. I added the directories I didn’t want to see and committed again. I didn’t work. Figuring it must’ve been my error, I tried again. And again. And again. Finally, I asked one of my co-developers to try it for me instead, see if this was actually a problem between my keyboard and chair. He ignored, committed, and found the repository filled with logs and docs. He tried again. And again. And again.
Finally, I figured out the problem: although subversion will happily tell you that the properties for ‘.’ have been changed, it only ignores files and directories that do not exist in the repository at the time you try ignore them. Yes, I did read the otherwise excellent documentation, but it doesn’t tell you that it can’t be done. It took me a few hours to find out. So: if you find subversion does not listen to the svn:ignore property: make sure that the files aren’t in the repository already. If they are, delete them from the repository, commit the change in which they are deleted and set the ignores as usual.
I do hope this might save someone some time.