Differential D14970 Diff 36173 src/applications/differential/engine/DifferentialDiffExtractionEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/engine/DifferentialDiffExtractionEngine.php
| Show First 20 Lines • Show All 150 Lines • ▼ Show 20 Lines | foreach ($changesets as $path => $changeset) { | ||||
| $response = DiffusionQuery::callConduitWithDiffusionRequest( | $response = DiffusionQuery::callConduitWithDiffusionRequest( | ||||
| $viewer, | $viewer, | ||||
| $drequest, | $drequest, | ||||
| 'diffusion.filecontentquery', | 'diffusion.filecontentquery', | ||||
| array( | array( | ||||
| 'commit' => $identifier, | 'commit' => $identifier, | ||||
| 'path' => $path, | 'path' => $path, | ||||
| )); | )); | ||||
| $corpus = $response['corpus']; | |||||
| if ($files[$file_phid]->loadFileData() != $corpus) { | $new_file_phid = $response['filePHID']; | ||||
| if (!$new_file_phid) { | |||||
| return true; | |||||
| } | |||||
| $new_file = id(new PhabricatorFileQuery()) | |||||
| ->setViewer($viewer) | |||||
| ->withPHIDs(array($new_file_phid)) | |||||
| ->executeOne(); | |||||
| if (!$new_file) { | |||||
| return true; | |||||
| } | |||||
| if ($files[$file_phid]->loadFileData() != $new_file->loadFileData()) { | |||||
| return true; | return true; | ||||
| } | } | ||||
| } else { | } else { | ||||
| $context = implode("\n", $changeset->makeChangesWithContext()); | $context = implode("\n", $changeset->makeChangesWithContext()); | ||||
| $vs_context = implode("\n", $vs_changeset->makeChangesWithContext()); | $vs_context = implode("\n", $vs_changeset->makeChangesWithContext()); | ||||
| // We couldn't just compare $context and $vs_context because following | // We couldn't just compare $context and $vs_context because following | ||||
| // diffs will be considered different: | // diffs will be considered different: | ||||
| ▲ Show 20 Lines • Show All 95 Lines • Show Last 20 Lines | |||||