It is good practice to remove old code instead of just commenting it out. It is often claimed that the old code parts can always be found again in the old SVN repository revision, if needed.
But practically, it's not that easy, right? If the old code is in some unknown old SVN revision then it can be quite hard to find.
I'm exactly in that situation right now: There's a function that I don't need anymore, and I should throw it out, since it's in SVN, but I hesitate because I might need it again, and I'm afraid it's going to be hard to find in the repository.
Of course, one can always make a commit message, saying "removed function myFunction", but sometimes you can't note every little code removal in the commit message, and it can also be tedious to look through all commit messages to find something again.
An automatic tool would be better, something like
svn find "void myFunction\(" my-file.cc
which would tell me the different results from different revisions. Does something like that exist?
EDIT: Do other version control systems have it? Git maybe? (That'd be a reason to switch, I'd say.)
UPDATE: So there's no real answer except the tiny brittle shell
script I found more or less by accident (see my answer below). I think, that's really a shame for SVN. Finding something in earlier revisions should be one of the central functionalities of version control. Does anyone have more info?