Changeset View
Changeset View
Standalone View
Standalone View
scripts/arcanist.php
| Show All 25 Lines | array( | ||||
| 'param' => 'filename', | 'param' => 'filename', | ||||
| ), | ), | ||||
| array( | array( | ||||
| 'name' => 'conduit-uri', | 'name' => 'conduit-uri', | ||||
| 'param' => 'uri', | 'param' => 'uri', | ||||
| 'help' => pht('Connect to Phabricator install specified by __uri__.'), | 'help' => pht('Connect to Phabricator install specified by __uri__.'), | ||||
| ), | ), | ||||
| array( | array( | ||||
| 'name' => 'conduit-token', | |||||
| 'param' => 'token', | |||||
| 'help' => pht('Use a specific authentication token.'), | |||||
| ), | |||||
| array( | |||||
| 'name' => 'conduit-version', | 'name' => 'conduit-version', | ||||
| 'param' => 'version', | 'param' => 'version', | ||||
| 'help' => pht( | 'help' => pht( | ||||
| '(Developers) Mock client version in protocol handshake.'), | '(Developers) Mock client version in protocol handshake.'), | ||||
| ), | ), | ||||
| array( | array( | ||||
| 'name' => 'conduit-timeout', | 'name' => 'conduit-timeout', | ||||
| 'param' => 'timeout', | 'param' => 'timeout', | ||||
| 'help' => pht('Set Conduit timeout (in seconds).'), | 'help' => pht('Set Conduit timeout (in seconds).'), | ||||
| ), | ), | ||||
| array( | array( | ||||
| 'name' => 'config', | 'name' => 'config', | ||||
| 'param' => 'key=value', | 'param' => 'key=value', | ||||
| 'repeat' => true, | 'repeat' => true, | ||||
| 'help' => pht( | 'help' => pht( | ||||
| 'Specify a runtime configuration value. This will take precedence '. | 'Specify a runtime configuration value. This will take precedence '. | ||||
| 'over static values, and only affect the current arcanist invocation.'), | 'over static values, and only affect the current arcanist invocation.'), | ||||
| ), | ), | ||||
| )); | )); | ||||
| $config_trace_mode = $base_args->getArg('trace'); | $config_trace_mode = $base_args->getArg('trace'); | ||||
| $force_conduit = $base_args->getArg('conduit-uri'); | $force_conduit = $base_args->getArg('conduit-uri'); | ||||
| $force_token = $base_args->getArg('conduit-token'); | |||||
| $force_conduit_version = $base_args->getArg('conduit-version'); | $force_conduit_version = $base_args->getArg('conduit-version'); | ||||
| $conduit_timeout = $base_args->getArg('conduit-timeout'); | $conduit_timeout = $base_args->getArg('conduit-timeout'); | ||||
| $skip_arcconfig = $base_args->getArg('skip-arcconfig'); | $skip_arcconfig = $base_args->getArg('skip-arcconfig'); | ||||
| $custom_arcrc = $base_args->getArg('arcrc-file'); | $custom_arcrc = $base_args->getArg('arcrc-file'); | ||||
| $load = $base_args->getArg('load-phutil-library'); | $load = $base_args->getArg('load-phutil-library'); | ||||
| $help = $base_args->getArg('help'); | $help = $base_args->getArg('help'); | ||||
| $args = array_values($base_args->getUnconsumedArgumentVector()); | $args = array_values($base_args->getUnconsumedArgumentVector()); | ||||
| ▲ Show 20 Lines • Show All 128 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 503 Lines • Show Last 20 Lines | |||||