It just happened to me that I commented out a line of code for testing reasons and ended up checking the code back into the repository with the commented line.
E.g. I set a rule for a job in Eclipse RCP on one line. While developing a new feature I commented out this one line so the rule does not get set.
After a couple of hours the new feature was completed and ready to be commited into SVN. While I changed a lot of things I usually just quickly double-check my changes by doing a synchronize with repository (in Eclipse) and skim through all classes doing some sort of in-mind sanity-check (i.e.: asking myself did I really touch this class?). But I don't check every single line.
So in this case I didn't remember the commented line and it got commited to SVN.
Now, I was wondering if I could find some automatism to prevent these kind of mistakes. I thought about making a code-template or a task-tag and marking the commented line with this. And then check for this task-tag in an svn pre-commit hook.
I googled for some time now but could not find anything. Does anyone know a way of doing this? Or maybe something that gets close to this and just needs minor changes to achieve what I'm looking for?