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

This obviously requires the source file to be under source control. Ideally, I would like to use a tool that works in the IDE (Eclipse, Visual Studio, etc.), but an external tool would also be nice. Obviously, you can manually review previous versions of a file and compare different versions, but I'm looking for a way to quickly see who is responsible for a section of code.

I use CVS, but the tool should work perfectly with various version control systems.

+7
version-control eclipse cvs
source share
7 answers

It looks like a guilty function supported in eclipse with CVS or Subversion (also in eclipse)

As you mentioned, the name of the eclipse for this function is Show Annotations .

Eclipse show-annotations

+16
source share

You did not mention which control source you are using.

If you are using Subversion, you can take a look at:

svn blame 

:)

+7
source share

For Visual Studio .NET with TFS.

The "Annotate" function also works in much the same way as with Blame.

(personally, I treat them as a tool for hunting for a team witch).

+2
source share

The question is quite wide / open. Anyway, this is a good idea, it can be used as a reference ...

At work, I use Perforce with its graphical interface. The Time-lapse view allows you to view the file with each line, the version of the version in which it was changed, and data (which represented the change, when, etc.). And you can move the slider to see previous versions.
There is a command line version: p4 annotate .

I am starting to use Mercurial, so I looked at it. A comparison of version control systems (a good site, I just opened it) shows that the hg annotate command.

+1
source share

In AccuRev, this is even more reasonable with the annotation function + "version slider", which will give you the opportunity to view the annotated version of the file in history:

(Not only who changed what was on the latest version, but also on all versions)

Accurev Version Slider http://www.accurev.com/images/screenshots/4.6/annotate.png

+1
source share

In many version control systems, including CVS , Perforce , AccuRev , Mercurial, and Team Foundation Server , the annotate command.

In Subversion and RCS , the blame command.

For example, with CVS:

 cvs annotate foo.cc > foo_changes.txt 

will create foo_changes.txt , which lists the version number and username associated with the last change for each line in the current version of foo.cc Using different parameters will give you the same information for previous versions or marked versions of a file.

I was also asked this question, but he did not immediately jump on me, reading the answers already published, so I hope this summary should help.

+1
source share

For perforce, the plugin in the Eclipse annotate does not appear in the context menu. So I need to use: p4 annotate my-file , and then use Eclipse to view the history.

0
source share

All Articles