Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the easiest way to figure out who wrote/edited this line of code?

This obviously requires the source file to be under source control. I would ideally like a tool which works under the IDE (Eclipse, Visual Studio, etc) - but an external tool would be nice, too. Obviously, it is possible manually go through previous versions of the file, and compare the various versions, but I am looking for a way to be able to see quickly who is responsible for a code section.

I am using CVS, but the tool should ideally work with different source control systems.

like image 288
Ola Eldøy Avatar asked Dec 15 '08 07:12

Ola Eldøy


3 Answers

That looks like the blame function, supported in eclipse with CVS, or with Subversion (also in eclipse)

As you mention, the eclipse-name for that feature is Show Annotations.

Eclipse Show-Annotations

like image 89
VonC Avatar answered Nov 17 '22 15:11

VonC


You don't mention wich source control are you using.

If you're using Subversion, you can take a look at:

svn blame

:)

like image 7
OscarRyz Avatar answered Nov 17 '22 15:11

OscarRyz


For Visual Studio .NET with TFS.

The function is "Annotate" and works pretty much the same with Blame.

(personally I refer to these as the team's witch hunt tool).

like image 2
John Liu Avatar answered Nov 17 '22 16:11

John Liu