Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistWorkflow.php
| Show First 20 Lines • Show All 1,802 Lines • ▼ Show 20 Lines | final protected function newDiffParser() { | ||||
| $parser = new ArcanistDiffParser(); | $parser = new ArcanistDiffParser(); | ||||
| if ($this->repositoryAPI) { | if ($this->repositoryAPI) { | ||||
| $parser->setRepositoryAPI($this->getRepositoryAPI()); | $parser->setRepositoryAPI($this->getRepositoryAPI()); | ||||
| } | } | ||||
| $parser->setWriteDiffOnFailure(true); | $parser->setWriteDiffOnFailure(true); | ||||
| return $parser; | return $parser; | ||||
| } | } | ||||
| final protected function resolveCall(ConduitFuture $method) { | |||||
| try { | |||||
| return $method->resolve(); | |||||
| } catch (ConduitClientException $ex) { | |||||
| if ($ex->getErrorCode() == 'ERR-CONDUIT-CALL') { | |||||
| echo phutil_console_wrap( | |||||
| pht( | |||||
| 'This feature requires a newer version of Phabricator. Please '. | |||||
| 'update it using these instructions: %s', | |||||
| 'https://secure.phabricator.com/book/phabricator/article/'. | |||||
| 'upgrading/')."\n\n"); | |||||
| } | |||||
| throw $ex; | |||||
| } | |||||
| } | |||||
| final protected function dispatchEvent($type, array $data) { | final protected function dispatchEvent($type, array $data) { | ||||
| $data += array( | $data += array( | ||||
| 'workflow' => $this, | 'workflow' => $this, | ||||
| ); | ); | ||||
| $event = new PhutilEvent($type, $data); | $event = new PhutilEvent($type, $data); | ||||
| PhutilEventEngine::dispatchEvent($event); | PhutilEventEngine::dispatchEvent($event); | ||||
| ▲ Show 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | /* -( Phabricator Repositories )------------------------------------------- */ | ||||
| private function loadRepositoryInformation() { | private function loadRepositoryInformation() { | ||||
| list($query, $reasons) = $this->getRepositoryQuery(); | list($query, $reasons) = $this->getRepositoryQuery(); | ||||
| if (!$query) { | if (!$query) { | ||||
| return array(null, $reasons); | return array(null, $reasons); | ||||
| } | } | ||||
| try { | try { | ||||
| $method = 'repository.query'; | $method = 'repository.query'; | ||||
| $results = $this->getConduitEngine()->newCall($method, $query) | $results = $this->getConduitEngine() | ||||
| ->newFuture($method, $query) | |||||
| ->resolve(); | ->resolve(); | ||||
| } catch (ConduitClientException $ex) { | } catch (ConduitClientException $ex) { | ||||
| if ($ex->getErrorCode() == 'ERR-CONDUIT-CALL') { | if ($ex->getErrorCode() == 'ERR-CONDUIT-CALL') { | ||||
| $reasons[] = pht( | $reasons[] = pht( | ||||
| 'This version of Arcanist is more recent than the version of '. | 'This version of Arcanist is more recent than the version of '. | ||||
| 'Phabricator you are connecting to: the Phabricator install is '. | 'Phabricator you are connecting to: the Phabricator install is '. | ||||
| 'out of date and does not have support for identifying '. | 'out of date and does not have support for identifying '. | ||||
| 'repositories by callsign or URI. Update Phabricator to enable '. | 'repositories by callsign or URI. Update Phabricator to enable '. | ||||
| ▲ Show 20 Lines • Show All 507 Lines • Show Last 20 Lines | |||||