I\'d like to grep all revisions of a file for a string. e.g. to find when a function was added or removed.
Is there a \"simple\" way to do this? (i.e.
The first thing that you want to do will be difficult. I would normally suggest using svn diff or svn cat, but there is (as far as I know) no way to get the revision number inline with the code output.
On the second question, if you're looking for a specific user, you can use
svn log | grep -A 2 username
which will give you two extra lines after every matched line (-A = "after"). If you don't have very long log messages, you can use
svn log | grep -B 2 search_string
which will similarly print two lines before (-B) each matched line. (Which should hopefully be enough to give you the revision number.) I am absolutely certain that there is a better way with AWK to give you the revision numbers in line with the log messages, but I'm tired and I can't think of it right now. :D