Differential D20056 Diff 47924 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 171 Lines • ▼ Show 20 Lines | foreach ($changesets as $path => $changeset) { | ||||
} | } | ||||
$drequest = DiffusionRequest::newFromDictionary( | $drequest = DiffusionRequest::newFromDictionary( | ||||
array( | array( | ||||
'user' => $viewer, | 'user' => $viewer, | ||||
'repository' => $repository, | 'repository' => $repository, | ||||
)); | )); | ||||
try { | |||||
$response = DiffusionQuery::callConduitWithDiffusionRequest( | $response = DiffusionQuery::callConduitWithDiffusionRequest( | ||||
$viewer, | $viewer, | ||||
$drequest, | $drequest, | ||||
'diffusion.filecontentquery', | 'diffusion.filecontentquery', | ||||
array( | array( | ||||
'commit' => $identifier, | 'commit' => $identifier, | ||||
'path' => $path, | 'path' => $path, | ||||
)); | )); | ||||
} catch (Exception $ex) { | |||||
// TODO: See PHI1044. This call may fail if the diff deleted the | |||||
// file. If the call fails, just detect a change for now. This should | |||||
// generally be made cleaner in the future. | |||||
return true; | |||||
} | |||||
$new_file_phid = $response['filePHID']; | $new_file_phid = $response['filePHID']; | ||||
if (!$new_file_phid) { | if (!$new_file_phid) { | ||||
return true; | return true; | ||||
} | } | ||||
$new_file = id(new PhabricatorFileQuery()) | $new_file = id(new PhabricatorFileQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
▲ Show 20 Lines • Show All 123 Lines • Show Last 20 Lines |