プロジェクト

全般

プロフィール

Vote #73935

未完了

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

Admin Redmine さんがほぼ2年前に追加. ほぼ2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
SCM_3
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
3
version_id:
0
issue_org_id:
14116
author_id:
6508
assigned_to_id:
0
comments:
2
status_id:
1
tracker_id:
1
plus1:
1
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

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 commit.space != '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 * commit.space;
 
@@ -95,6 +99,7 @@ function drawRevisionGraph(holder, commits_hash, graph_space) {
         }
 
         top.push(revision_dot_overlay);
+      }
     });
 
     top.toFront();

????

Comments are welcome.


journals

+1, this needs a fix.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,11612,Revision graph sometimes broken due to raphael.js error

Admin Redmine さんがほぼ2年前に更新

  • カテゴリSCM_3 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0