Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I work on a very large project (10000+ versions) and sometimes it happened that I need to know who of the other users deleted some line in a file. Is there a way to do that that? I can do svn blame with revision number to check if a line exists in that revision, then see in which revision the line is gone and see who commited that revision, but that procedure is lame with that large project.

Is there a smarter way to do that?

share|improve this question

This does what you need automatically, though not very fast because it doesn't use binary search as suggested above:

svn log FILE | egrep '^r[0-9]' | sed -e 's/ .*//' | while read rev; do echo $rev ; svn cat FILE -"$rev" | grep "case STRING" && break  ; done 
share|improve this answer

I would check the history of the file and try and quickly find a revision where that line is present, and then blame between HEAD and that revision.

If the file has gone through 100 revisions since inception then if you binary search through revisions looking for that line you shouldn't have to look at more than 10 different revisions.

share|improve this answer
I don't see the opinion, it all looks like good advice to me :P – Phoshi Apr 20 '10 at 10:55
This is the same as my approach. I want something simplier/faster than looking in 10 revisions. – Ivan Petrushev Apr 20 '10 at 11:40's 10 revisions. By the time you posted the above question you could be done by now. Unless this is something you will have to do over again, in which case disregard my comments. – Apr 20 '10 at 12:08
Yep, it is excellent for a single shot, but I need something that can be used often on a regular basis. – Ivan Petrushev Apr 20 '10 at 13:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .