Defect #14116

Don't render dot for commit which have no space property in revision graph (fine fix for #11612)

Added by Etienne Massip over 9 years ago. Updated almost 6 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution: Affected version:


Quoting Jens from #11612#note-9 where he suggested to not add a commit node on the revision graph when it doesn't have a space property, meaning it's not attached to any branch anymore:

We recently had the same problem - graph rendering broke completely for a repository due to JS errors because some commits were missing the space property.

Turns out that on a fresh install, where the repository in question was re-imported, the problem didn't occur, because the problematic commits didnt show up at all. Further investigation showed that those commits were basically abandoned and not connected to any branch.

I think not rendering these commits in the graph at all is much better than putting them randomly on the first branch as the patch above does.

Here's the patch for 1.4:

--- a/public/javascripts/revision_graph.js
+++ b/public/javascripts/revision_graph.js
@@ -41,6 +41,10 @@ function drawRevisionGraph(holder, commits_hash, graph_space) {

     commits.each(function(commit) {

+      if (typeof != 'undefined') {
         y = commit_table_rows[max_rdmid - commit.rdmid].getLayout().get('top') - graph_y_offset + CIRCLE_INROW_OFFSET;
         x = graph_x_offset + XSTEP / 2 + XSTEP *;

@@ -95,6 +99,7 @@ function drawRevisionGraph(holder, commits_hash, graph_space) {

+      }



Comments are welcome.

Related issues

Related to Redmine - Defect #11612: Revision graph sometimes broken due to raphael.js error Closed


#1 Updated by Stephane Lapie almost 6 years ago

+1, this needs a fix.

#2 Updated by Toshi MARUYAMA almost 6 years ago

  • Description updated (diff)

Also available in: Atom PDF