Is it generally possible while using source code management to figure out in what version of a file a specific line was added? If so, what SCM systems support this?


It would be a poor version control system that didn't allow you to do this. A technical term for displaying the origin of lines by version is annotating a controlled file with its history. Recently, newer RCS like svn and git have switched to calling the action blame instead, but the functionality is the same. Searching for those two terms will tell you how to do it in your RCS of choice.

| improve this answer | |
  • Thanks Kilian, this was my feeling exactly, but I didn't know how the process is called. (background: I work in a hardware company and use ClearCase; SCM usage is not really fully understood here) – Tudor Timi May 9 '14 at 9:55

In perforce the easiest way is to run p4v and look at the file's "Time-lapse view".

For every line of code you can see which revision it was added, and if you fiddle with the range sliders at the top you can see which lines were deleted.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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