プロジェクト

全般

プロフィール

Vote #71349

未完了

Limit the amount of data returned by scm diff commands

Admin Redmine さんがほぼ4年前に追加.

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

0%

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

説明

We have encountered a problem where Redmine exhausts memory processing the output of the SCM diff command (subversion in our case).

I would like to propose a solution where the size of the diff output is verified prior to trying to process the data in UnifiedDiff.

Problem:

UnifiedDiff has code that limits the number of lines shown when displaying diffs (options[:max_lines]). The problem is that the input to UnifiedDiff can exceed the memory of the system before the check for max_lines can be performed.

Suggested solution(s):

in /lib/redmine/scm/adapters, modify the scm adapters to limit the output from the {scm} diff command.

  • One possible solution would be to instead show a summary of the differences and allow the user to select an individual file.

  • Another solution add code to the diff function within {scm}_adapter.rb to perform a diff --summarize first and count the number of files changed and return an error message if it exceeds a threshold.

表示するデータがありません

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

いいね!0