Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335818

Summary: History View: Graph is not rendered correctly
Product: [Technology] EGit Reporter: Jens Baumgart <jens.baumgart>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: angvoz.dev, christian.halstrick, dmgloss, ingmar.nebel, robin
Version: 0.11   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Commit graph
none
Commit graph 2 none

Description Jens Baumgart CLA 2011-01-31 04:47:41 EST
The commit graph in history view is not rendered correctly (see attached picture).

The graph indicates that commit [CommitOperation: replace usages of deprecated GitIndex, 1e5ec25f] is a predecessor of commit [Merge "[repoView] Allow to change a Push URI", 40a14c96].

This is wrong: commit [CommitOperation: replace usages of deprecated GitIndex, 1e5ec25f] is local and has no successor.
Comment 1 Jens Baumgart CLA 2011-01-31 04:49:30 EST
Created attachment 187938 [details]
Commit graph
Comment 2 Robin Stocker CLA 2011-05-30 08:04:34 EDT
Created attachment 196885 [details]
Commit graph 2

The attached picture shows another case where the graph is wrong. The bottom commit on the red line isn't the parent of the commit at the top.

What's interesting is that the bottom commit has a short yellow line. And if one follows the red line (which is interrupted many times by "yellow commits"), one can find the real parent. So the problem seems to be that the lane is shared when it should be two separate lanes.
Comment 3 Vadim Dmitriev CLA 2011-12-02 07:34:56 EST
Problem originates from org.eclipse.jgit.revplot.PlotCommitList.enter(int, PlotCommit<L>). The "single child" method's branch doesn't check if free lane is in one of the blocked positions as "multi child" branch does.

Fix is trivial and involves copy-pasting. I'm sure jgit committers will fix this issue faster without patch contributions :)

P.S. Looks like it is JGit issue.
Comment 4 Christian Halstrick CLA 2011-12-02 07:56:52 EST
Great info Vadim. I'll try that out.
Comment 5 Christian Halstrick CLA 2011-12-02 10:04:15 EST
A fix in jgit is proposed here: http://egit.eclipse.org/r/#change,4719 . I currently don't have a repo which has this rendering problem. I ask those who see the rendering problem to try it out. Does it solve your problem?
Comment 6 Vadim Dmitriev CLA 2011-12-02 10:34:53 EST
(In reply to comment #5)
> A fix in jgit is proposed here: http://egit.eclipse.org/r/#change,4719 . I
> currently don't have a repo which has this rendering problem. I ask those who
> see the rendering problem to try it out. Does it solve your problem?

Solves for me.
Comment 7 Christian Halstrick CLA 2011-12-05 19:11:10 EST
I think this problem is solved with http://egit.eclipse.org/r/#change,4719 . Let's close it. Thanks Vadim!