Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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
1  
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
    
...it'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. –  ta.speot.is Apr 20 '10 at 12:08
1  
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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.