Project

General

Profile

Actions

Feature #10203

open

Limit the amount of data returned by scm diff commands

Added by Cheyenne Wills almost 13 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

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.

No data to display

Actions

Also available in: Atom PDF