svn: How do I determine the last time a certain line was changed?
Question
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).
OTHER TIPS
svn blame -v filename
. Verbose gives revision number, name and date
svn [praise|annotate|blame] filename
gives you the version number and last writer or editor.
svn [praise|annotate|blame] -v filename
will give you additional information. if you have merged the branch, in this case
svn blame -g filename
you should use the following command to know all the available options
svn blame --help
There's the "svn blame" tool for that.
svn blame filename
Then look at the log for the revision in which it was changed.
As others have already mentioned, you can use:
svn annotate filename
to show when that line was last modified. Do be careful though, since that will show the last time that anything on that line was modified. So, if the code was moved in the file, that is deleted from one place, and pasted somewhere else, it will show when the line was moved, not necessarily when it was modified. The same goes if the line was moved into, or out of, a loop, or if statement.