Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365460 - History graph sometimes stops using vacant positions for new lanes
Summary: History graph sometimes stops using vacant positions for new lanes
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: 1.2   Edit
Assignee: Christian Halstrick CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-02 12:16 EST by Vadim Dmitriev CLA
Modified: 2011-12-06 17:46 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vadim Dmitriev CLA 2011-12-02 12:16:20 EST
Build Identifier: 

Look for "commit.lane.position = newPos" in org.eclipse.jgit.revplot.PlotCommitList.handleBlockedLanes(int, PlotCommit<L>, int). This line indirectly modifies object's hashcode, but this PlotLane is already contained in "activeLanes" HashSet. I think you see where it goes :)
Changing it to the following text fixes the issue.
"activeLanes.remove(commit.lane);
commit.lane.position = newPos;
activeLanes.add(commit.lane);"

P.S. Sorry for not doing it the right git way: with a new commit, patch etc. I'll read egit/jgit contributors guide, honestly :)

Reproducible: Always

Steps to Reproduce:
Look at 90c11cbaeb83ee9b02238cbd2c0e5bcf68068772 in jgit repo. Its lane is displayed at position 30+ while positions 7-30 are vacant.
Comment 1 Matthias Sohn CLA 2011-12-05 18:59:48 EST
please retry with todays nightly, Chris' fix 
http://egit.eclipse.org/r/#change,4735 
was submitted to stable-1.2
Comment 2 Christian Halstrick CLA 2011-12-05 19:40:09 EST
No Matthias, Vadim is already looking at my new code.

I also noticed that we are using with my latest fix too many lanes and I now understand why. That's a tricky Thanks again Vadim! I fixed it with http://egit.eclipse.org/r/4743. Matthias, do we want that fix on 1.2?
Comment 3 Matthias Sohn CLA 2011-12-06 03:55:02 EST
(In reply to comment #2)
> No Matthias, Vadim is already looking at my new code.
> 
> I also noticed that we are using with my latest fix too many lanes and I now
> understand why. That's a tricky Thanks again Vadim! I fixed it with
> http://egit.eclipse.org/r/4743. Matthias, do we want that fix on 1.2?

yes, please retarget this change to 1.2 (with Gerrit 2.2 you can simply push the same change to refs/for/stable-1.2 and abandon the other change, I'll merge 1.2 back to master soon
Comment 4 Christian Halstrick CLA 2011-12-06 04:32:09 EST
Done. http://egit.eclipse.org/r/#change,4744 is the new change for 1.2. Change for master is abandoned
Comment 5 Matthias Sohn CLA 2011-12-06 17:46:48 EST
merged as 251bc02840a2e722a6cf660e4adde0e63d3d2de1