Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistDiffWorkflow.php
| Show First 20 Lines • Show All 3,045 Lines • ▼ Show 20 Lines | try { | ||||
| // TODO: Eventually, we should expect these to succeed if we get this | // TODO: Eventually, we should expect these to succeed if we get this | ||||
| // far, but just log errors for now. | // far, but just log errors for now. | ||||
| phlog($ex); | phlog($ex); | ||||
| return false; | return false; | ||||
| } | } | ||||
| } | } | ||||
| private function getDependsOnRevisionRef() { | private function getDependsOnRevisionRef() { | ||||
| // TODO: Restore this behavior after updating for toolsets. Loading the | |||||
| // required hardpoints currently depends on a "WorkingCopy" existing. | |||||
| return null; | |||||
| $api = $this->getRepositoryAPI(); | $api = $this->getRepositoryAPI(); | ||||
| $base_ref = $api->getBaseCommitRef(); | $base_ref = $api->getBaseCommitRef(); | ||||
| $state_ref = $this->newWorkingCopyStateRef() | $state_ref = id(new ArcanistWorkingCopyStateRef()) | ||||
| ->setCommitRef($base_ref); | ->setCommitRef($base_ref); | ||||
| $this->newRefQuery(array($state_ref)) | $this->loadHardpoints( | ||||
| ->needHardpoints( | |||||
| array( | array( | ||||
| 'revisionRefs', | $state_ref, | ||||
| )) | ), | ||||
| ->execute(); | array( | ||||
| ArcanistWorkingCopyStateRef::HARDPOINT_REVISIONREFS, | |||||
| )); | |||||
| $revision_refs = $state_ref->getRevisionRefs(); | $revision_refs = $state_ref->getRevisionRefs(); | ||||
| $viewer_phid = $this->getUserPHID(); | $viewer_phid = $this->getUserPHID(); | ||||
| foreach ($revision_refs as $key => $revision_ref) { | foreach ($revision_refs as $key => $revision_ref) { | ||||
| // Don't automatically depend on closed revisions. | // Don't automatically depend on closed revisions. | ||||
| if ($revision_ref->isClosed()) { | if ($revision_ref->isClosed()) { | ||||
| unset($revision_refs[$key]); | unset($revision_refs[$key]); | ||||
| Show All 22 Lines | |||||