user76293
user76293

Reputation: 569

svn diff a specific line in a file

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?

Upvotes: 4

Views: 1162

Answers (1)

Lasse V. Karlsen
Lasse V. Karlsen

Reputation: 391316

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

Upvotes: 9

Related Questions