Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354507 - "Show blame annotations" fails when working on renamed files
Summary: "Show blame annotations" fails when working on renamed files
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-11 10:51 EDT by Christian Halstrick CLA
Modified: 2011-09-03 17:42 EDT (History)
2 users (show)

See Also:


Attachments
a repo containing a renamed file (68.78 KB, application/zip)
2011-08-11 10:52 EDT, Christian Halstrick CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Halstrick CLA 2011-08-11 10:51:34 EDT
When trying to inspect blame annotations on a file which was renamed before I get an error dialog saying "'Computing blame annotations' has encountered a problem ....".

Steps to reproduce:
- unpack the attached repo
- import the project in the repo into latest EGit
- in EGit navigate to /DemoCalc/src/xyz/com/test/Calc.java
- rightclick on the file and select "Team->Show blame annotations"
-> an error dialog pops up and the error log contains a stacktrace like this:

java.lang.IllegalStateException: Renames have already been found.
	at org.eclipse.jgit.diff.RenameDetector.addAll(RenameDetector.java:245)
	at org.eclipse.jgit.blame.BlameGenerator.findRename(BlameGenerator.java:948)
	at org.eclipse.jgit.blame.BlameGenerator.processOne(BlameGenerator.java:589)
	at org.eclipse.jgit.blame.BlameGenerator.next(BlameGenerator.java:479)
	at org.eclipse.jgit.blame.BlameResult.computeAll(BlameResult.java:239)
	at org.eclipse.jgit.blame.BlameGenerator.computeBlameResult(BlameGenerator.java:433)
	at org.eclipse.jgit.api.BlameCommand.call(BlameCommand.java:220)
	at org.eclipse.egit.ui.internal.blame.BlameOperation.execute(BlameOperation.java:82)
	at org.eclipse.egit.ui.internal.job.JobUtil$1.run(JobUtil.java:50)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Christian Halstrick CLA 2011-08-11 10:52:50 EDT
Created attachment 201320 [details]
a repo containing a renamed file
Comment 2 Kevin Sawicki CLA 2011-09-01 16:30:34 EDT
Proposed fix pushed to: http://egit.eclipse.org/r/#change,4118
Comment 3 Matthias Sohn CLA 2011-09-03 17:42:24 EDT
merged as d110fbc300fe32b00a491e6471d5534f4615b87b