mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-02-27 05:59:08 +01:00
Suggest upgrading Phabricator for unknown Conduit methods or parameters
Summary: This allows using new methods without the need for bumping version number. The usage is not neccessary because we already bumped the version number for this but I wanted to have a callsite. Test Plan: Made a typo in method name, then: $ arc lint --only-new 1 Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4193
This commit is contained in:
parent
7133c76d37
commit
5f5392df8a
2 changed files with 16 additions and 1 deletions
|
@ -1466,6 +1466,21 @@ abstract class ArcanistBaseWorkflow {
|
||||||
return $parser;
|
return $parser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function resolveCall(ConduitFuture $method, $timeout = null) {
|
||||||
|
try {
|
||||||
|
return $method->resolve($timeout);
|
||||||
|
} catch (ConduitClientException $ex) {
|
||||||
|
if ($ex->getErrorCode() == 'ERR-CONDUIT-CALL') {
|
||||||
|
echo phutil_console_wrap(
|
||||||
|
"This feature requires a newer version of Phabricator. Please ".
|
||||||
|
"update it using these instructions: ".
|
||||||
|
"http://www.phabricator.com/docs/phabricator/article/".
|
||||||
|
"Installation_Guide.html#updating-phabricator\n\n");
|
||||||
|
}
|
||||||
|
throw $ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected function dispatchEvent($type, array $data) {
|
protected function dispatchEvent($type, array $data) {
|
||||||
$data += array(
|
$data += array(
|
||||||
'workflow' => $this,
|
'workflow' => $this,
|
||||||
|
|
|
@ -293,7 +293,7 @@ EOTEXT
|
||||||
$timeout = 0;
|
$timeout = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$raw_messages = $lint_future->resolve($timeout);
|
$raw_messages = $this->resolveCall($lint_future, $timeout);
|
||||||
if ($raw_messages && $total) {
|
if ($raw_messages && $total) {
|
||||||
$old_messages = array();
|
$old_messages = array();
|
||||||
$line_maps = array();
|
$line_maps = array();
|
||||||
|
|
Loading…
Add table
Reference in a new issue