Changeset View
Changeset View
Standalone View
Standalone View
scripts/arcanist.php
| Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | try { | ||||
| // Write the command into the environment so that scripts (for example, local | // Write the command into the environment so that scripts (for example, local | ||||
| // Git commit hooks) can detect that they're being run via `arc` and change | // Git commit hooks) can detect that they're being run via `arc` and change | ||||
| // their behaviors. | // their behaviors. | ||||
| putenv('ARCANIST='.$command); | putenv('ARCANIST='.$command); | ||||
| if ($force_conduit_version) { | if ($force_conduit_version) { | ||||
| $workflow->forceConduitVersion($force_conduit_version); | $workflow->forceConduitVersion($force_conduit_version); | ||||
| } | } | ||||
| if ($force_token) { | |||||
| $workflow->forceConduitToken($force_token); | |||||
| } | |||||
| if ($conduit_timeout) { | if ($conduit_timeout) { | ||||
| $workflow->setConduitTimeout($conduit_timeout); | $workflow->setConduitTimeout($conduit_timeout); | ||||
| } | } | ||||
| $need_working_copy = $workflow->requiresWorkingCopy(); | $need_working_copy = $workflow->requiresWorkingCopy(); | ||||
| $supported_vcs_types = $workflow->getSupportedRevisionControlSystems(); | $supported_vcs_types = $workflow->getSupportedRevisionControlSystems(); | ||||
| $vcs_type = $working_copy->getVCSType(); | $vcs_type = $working_copy->getVCSType(); | ||||
| ▲ Show 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | if ($need_conduit) { | ||||
| $workflow->establishConduit(); | $workflow->establishConduit(); | ||||
| } | } | ||||
| $hosts_config = idx($user_config, 'hosts', array()); | $hosts_config = idx($user_config, 'hosts', array()); | ||||
| $host_config = idx($hosts_config, $conduit_uri, array()); | $host_config = idx($hosts_config, $conduit_uri, array()); | ||||
| $user_name = idx($host_config, 'user'); | $user_name = idx($host_config, 'user'); | ||||
| $certificate = idx($host_config, 'cert'); | $certificate = idx($host_config, 'cert'); | ||||
| $conduit_token = idx($host_config, 'token'); | $conduit_token = idx($host_config, 'token'); | ||||
| if ($force_token) { | |||||
| $conduit_token = $force_token; | |||||
| } | |||||
| $description = implode(' ', $original_argv); | $description = implode(' ', $original_argv); | ||||
| $credentials = array( | $credentials = array( | ||||
| 'user' => $user_name, | 'user' => $user_name, | ||||
| 'certificate' => $certificate, | 'certificate' => $certificate, | ||||
| 'description' => $description, | 'description' => $description, | ||||
| 'token' => $conduit_token, | 'token' => $conduit_token, | ||||
| ); | ); | ||||
| ▲ Show 20 Lines • Show All 394 Lines • Show Last 20 Lines | |||||