svn: How do I determine the last time a certain line was changed?

Les picture Les · Jan 15, 2010 · Viewed 23.7k times · Source

I have a bit of code that I would like to see revision history for. In the example file, line 300 contains something "interesting". How can I use svn to see when that line has been changed and review the svn comment(s) that pertain to the changing of that line. (Note that previous revisions of that file will likely not have my target line of interest at line 300).

Answer

user197015 picture user197015 · Jan 15, 2010

You could use SVN's blame command. This will print author and revision numbers on a per-line basis for the specified target. Once you have the revision number you can review the commit logs and other changes associated with that revision using log, etc.