1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 09:12:41 +01:00

Load contents of shielded files with lots of changes

Summary:
We need `$this->old` and `$this->new` in `renderShield()`.

Broken since D2358.

Test Plan: Loaded contents of file with lots of changes.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3080
This commit is contained in:
vrana 2012-07-26 13:24:43 -07:00
parent c614af53bf
commit aefc5654c3

View file

@ -941,18 +941,9 @@ final class DifferentialChangesetParser {
$this->highlightEngine = PhabricatorSyntaxHighlighter::newEngine(); $this->highlightEngine = PhabricatorSyntaxHighlighter::newEngine();
$shield = null;
if ($this->isTopLevel && !$this->comments &&
!($this->isGenerated() || $this->isUnchanged() || $this->isDeleted()) &&
$this->changeset->getAffectedLineCount() > 2500) {
$lines = number_format($this->changeset->getAffectedLineCount());
$shield = $this->renderShield(
"This file has a very large number of changes ({$lines} lines).",
true);
} else {
$this->tryCacheStuff(); $this->tryCacheStuff();
$shield = null;
if ($this->isTopLevel && !$this->comments) { if ($this->isTopLevel && !$this->comments) {
if ($this->isGenerated()) { if ($this->isGenerated()) {
$shield = $this->renderShield( $shield = $this->renderShield(
@ -974,7 +965,11 @@ final class DifferentialChangesetParser {
$shield = $this->renderShield( $shield = $this->renderShield(
"This file was completely deleted.", "This file was completely deleted.",
true); true);
} } else if ($this->changeset->getAffectedLineCount() > 2500) {
$lines = number_format($this->changeset->getAffectedLineCount());
$shield = $this->renderShield(
"This file has a very large number of changes ({$lines} lines).",
true);
} }
} }