Questions tagged [blame]

Blame is the annotation of source code showing who last edited each section or line.

Blame is the annotation of source code in a revision control system with metadata indicating the most recent commit that changed a particular section or line of code. The information typically includes a commit id, the identify of the user who made the change, and the timestamp of the change.

Commands for various revision control systems include:

  • RCS: (no such command is available)
  • CVS: cvs annotate
  • Subversion: svn blame (aliases are svn praise, svn annotate, svn ann)
  • Git: git blame (git annotate is similar but uses a slightly different output format)
  • Mercurial: hg blame (alias hg annotate)
125 questions
3
votes
1 answer

Detect new lines in mercurial

We are studying to add precommit hooks to detect coding standards compliance with our company policy. We don't want to detect the legacy code, just the new lines added. In git it's possible to detect the line numbers that are added before…
pacorrop
  • 547
  • 1
  • 4
  • 10
3
votes
0 answers

Visual Studio Blame/Annotation to same view

While using Eclipse and IntelliJ for Java development I got used to seeing the annotation lines in edit mode right next to the changes I'm working on. Well, apparently Visual Studio always opens the annotations to a separate uneditable window. So…
Jeffed
  • 163
  • 2
  • 11
3
votes
1 answer

Exclude a file from SonarQube SCM blame?

Is it possible to exclude a file from Sonar's SCM blame data gathering? I have a file at this path: ./projects/ichrg/ichrg.Web/bottombar.cs svn blame from a command line works fine on the file, but when I run it with sonar I get the following…
Nick Udell
  • 2,420
  • 5
  • 44
  • 83
3
votes
5 answers

Sonar SCM failure no blame data on line 1

I'm running into some problems executing sonar analysis (Sonar Runner v2.4 and SonarQube 5.0) with SVN on a Windows 7 machine. I get the following error: java.lang.IllegalStateException: Unable to blame file DataTypes/TtCallPackagePlanType.cs. No…
Nick Udell
  • 2,420
  • 5
  • 44
  • 83
3
votes
1 answer

Tool to find most recent commit that is changed by a previous change or change in workspace

TL;DR (You'll probaly misunderstand this, so better skip to the next section ;) I'd like to find the (previous) commits a patch (commit or staged/unstaged workspace change) would change. TL;DR: continue reading, but skip "Background"…
try-catch-finally
  • 7,436
  • 6
  • 46
  • 67
3
votes
1 answer

Retrieve Decrypted Blame Info from SonarQube and SCM-Activity Plugin

I am trying to write a plugin for SonarQube that uses the blame information provided by the SCM-Activity plugin. The problem is that, in Sonar's database, the blame information seems to either be missing or encrypted. For example, I ran the…
James Dunn
  • 8,064
  • 13
  • 53
  • 87
3
votes
1 answer

Tell git-blame to use imported history

I have a repository which was created by copying files (not the history) from an SVN repository, with many changes added on top since. I have since converted the history in SVN into git, and merged it with git merge -s ours. The problem is when I do…
Jesse
  • 6,725
  • 5
  • 40
  • 45
2
votes
2 answers

Can I find out who introduced a code change in a SVN repository?

Can I get logs based on content? Let's say I want to know who introduced the code for a function, I will have to check the logs and their comments (checkin messages). If someone forgot to put in a log message, I will have to check each diff which…
shikhar
  • 2,431
  • 2
  • 19
  • 29
2
votes
1 answer

Find commit that deleted a line between two revision

I am trying to find the commit that deleted a line between between two revisions. I could not find it directly. This is what I tried in the following: git blame $v1..$v2 -L $line,+1 --reverse -- $file_name then this command line returns the line…
Amine Barrak
  • 139
  • 9
2
votes
0 answers

How can I find who edited all staged lines?

I have a project that I need to code review (and fix), and I need to trace back who did it. I have edited all relevant lines in the project, and now I would like to see a summary of who was the last editor to these lines. I have a guess that it was…
vrwim
  • 13,020
  • 13
  • 63
  • 118
2
votes
1 answer

GIT Diff with blame or source SHA

We feel we do a good job or reviewing each commit before merging in to master. However when we are ready for a new software release I often take one more review. I diff the last production release against the current production candidate. As I…
personalt
  • 810
  • 3
  • 13
  • 26
2
votes
1 answer

git doesn't show where code was removed

So I was tasked at replacing some dummy code that our project requires for historical compatibility reasons but has mysteriously dropped out sometime since the last release. Since disappearing code makes me nervous about what else might have gone…
asm
  • 8,758
  • 3
  • 27
  • 48
2
votes
3 answers

How do I list everyone who has ever committed to a file in Git?

I want to get a complete list of everyone who has ever committed to a file, is there a command (blame with some arguments, maybe) do that nicely? Thanks
sh1mmer
  • 1,316
  • 11
  • 19
2
votes
1 answer

Find all changes to single line with TortoiseSVN

I can use Log to find the full history of a single file, and I can use Blame to find who last changed a single line. Is there a way to get the full history of a single line with TortoisSVN or its console counterpart? Reason: I need to find out when…
Svish
  • 152,914
  • 173
  • 462
  • 620
2
votes
1 answer

How to see all matching ranges with git blame?

I can output first range matching regex with a command: git blame -L'/start_regex/','/end_regex/' file But how to output all next ranges matching this regex in the same file?
abyss.7
  • 13,882
  • 11
  • 56
  • 100
1 2 3
8 9