Is it possible to see the history of changes to a particular line of code in a Subversion repository?
I\'d like, for instance, to be able to see when a particular st
I don't know a method for tracking statements through time in Subversion.
It is simple however to see when any particular line in a file was last changed using svn blame
. Check the SVNBook: svn blame reference:
Synopsis
svn blame TARGET[@REV]...
Description
Show author and revision information in-line for the specified files or URLs. Each line of text is annotated at the beginning with the author (username) and the revision number for the last change to that line.
In Eclipse you can know when each line of your code has been committed using the SVN annotate view, or right click on the file → Team → Show annotation....
svn blame shows you which checkin modified any line in a file the last time.
This works on old revisions too.
The command you're looking for is svn blame.
This can be done in two stages:
svn blame /path/to/your/file > blame.tmp
grep "your_line_of_text" blame.tmp
You can delete blame.tmp file afterwards if you don't need it.
In principle, a simple script can be written in any scripting language that does roughly the same.