Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svn diff a specific line in a file

Tags:

diff

svn

I'd like to determine the last time a specific line was changed in an SVN-versioned file. Does SVN (or TortoiseSVN) have a command to do this?

I could write a script that would svn diff each successive revision backwards from HEAD, and check if the line at a given line number was different. But this simplistic approach will not work if, say, lines were inserted before the desired line, but the text of the line itself didn't change. I'm no expert on merge theory/diffing, so I don't know how this could be done. Any ideas?

like image 947
user76293 Avatar asked Jan 23 '23 17:01

user76293


1 Answers

Yes, the function you're looking for is called Blame, it's available both through the subversion command line interface and the TortoiseSVN interface.

like image 56
Lasse V. Karlsen Avatar answered Jan 26 '23 07:01

Lasse V. Karlsen