Vote #71349
未完了Limit the amount of data returned by scm diff commands
0%
説明
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.
表示するデータがありません