Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/engine/DifferentialChangesetEngine.php
Show First 20 Lines • Show All 82 Lines • ▼ Show 20 Lines | private function newEffectHash(DifferentialChangeset $changeset) { | ||||
return null; | return null; | ||||
} | } | ||||
/* -( Copied Code )-------------------------------------------------------- */ | /* -( Copied Code )-------------------------------------------------------- */ | ||||
private function detectCopiedCode(array $changesets) { | private function detectCopiedCode(array $changesets) { | ||||
// See PHI944. If the total number of changed lines is excessively large, | |||||
// don't bother with copied code detection. This can take a lot of time and | |||||
// memory and it's not generally of any use for very large changes. | |||||
$max_size = 65535; | |||||
amckinley: Should this hook into any of the `HUGE`/`TRULY_CRAZY_HUGE` diff detection stuff that got fixed… | |||||
$total_size = 0; | |||||
foreach ($changesets as $changeset) { | |||||
$total_size += ($changeset->getAddLines() + $changeset->getDelLines()); | |||||
} | |||||
if ($total_size > $max_size) { | |||||
return; | |||||
} | |||||
$min_width = 30; | $min_width = 30; | ||||
$min_lines = 3; | $min_lines = 3; | ||||
$map = array(); | $map = array(); | ||||
$files = array(); | $files = array(); | ||||
$types = array(); | $types = array(); | ||||
foreach ($changesets as $changeset) { | foreach ($changesets as $changeset) { | ||||
$file = $changeset->getFilename(); | $file = $changeset->getFilename(); | ||||
▲ Show 20 Lines • Show All 134 Lines • ▼ Show 20 Lines | foreach ($changesets as $changeset) { | ||||
$skip_lines = $best_offset; | $skip_lines = $best_offset; | ||||
} | } | ||||
} | } | ||||
$copies = array_filter($copies); | $copies = array_filter($copies); | ||||
if ($copies) { | if ($copies) { | ||||
$metadata = $changeset->getMetadata(); | $metadata = $changeset->getMetadata(); | ||||
$metadata['copy:lines'] = $copies; | $metadata['copy:lines'] = $copies; | ||||
Done Inline Actions(Here.) epriestley: (Here.) | |||||
$changeset->setMetadata($metadata); | $changeset->setMetadata($metadata); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } |
Should this hook into any of the HUGE/TRULY_CRAZY_HUGE diff detection stuff that got fixed a few months ago instead of defining a new constant here?