public function didRunWorkflow($command, ArcanistBaseWorkflow $workflow, $error_code) { if ($command == 'diff' && !$workflow->isRawDiffSource()) { $this->startTestsInJenkins($workflow); $this->startTestsInSandcastle($workflow); } }
public function didRunWorkflow($command, ArcanistBaseWorkflow $workflow, $error_code) { if ($command == 'diff' && !$workflow->isRawDiffSource()) { $this->maybePushToJenkins($workflow); } }
// Load the flag libraries. These must load, since the user specified them // explicitly. arcanist_load_libraries($load, $must_load = true, $lib_source = 'a "--load-phutil-library" flag', $working_copy, $config_trace_mode); } else { // Load libraries in system 'load' config. In contrast to global config, we // fail hard here because this file is edited manually, so if 'arc' breaks // that doesn't make it any more difficult to correct. arcanist_load_libraries(idx($system_config, 'load', array()), $must_load = true, $lib_source = 'the "load" setting in system config', $working_copy, $config_trace_mode); // Load libraries in global 'load' config, as per "arc set-config load". We // need to fail softly if these break because errors would prevent the user // from running "arc set-config" to correct them. arcanist_load_libraries(idx($global_config, 'load', array()), $must_load = false, $lib_source = 'the "load" setting in global config', $working_copy, $config_trace_mode); // Load libraries in ".arcconfig". Libraries here must load. arcanist_load_libraries($working_copy->getConfig('phutil_libraries'), $must_load = true, $lib_source = 'the "phutil_libraries" setting in ".arcconfig"', $working_copy, $config_trace_mode); } $user_config = ArcanistBaseWorkflow::readUserConfigurationFile(); $config = $working_copy->getConfig('arcanist_configuration'); if ($config) { $config = new $config(); } else { $config = new ArcanistConfiguration(); } $command = strtolower($args[0]); $args = array_slice($args, 1); $workflow = $config->buildWorkflow($command); if (!$workflow) { // If the user has an alias, like 'arc alias dhelp diff help', look it up // and substitute it. We do this only after trying to resolve the workflow // normally to prevent you from doing silly things like aliasing 'alias' // to something else. $aliases = ArcanistAliasWorkflow::getAliases($working_copy);
/** * Read a configuration directive from any available configuration source. * In contrast to @{method:getConfig}, this will look for the directive in * local and user configuration in addition to project configuration. * The precedence is local > project > user * * @param key Key to read. * @param wild Default value if key is not found. * @return wild Value, or default value if not found. * * @task config */ public function getConfigFromAnySource($key, $default = null) { // try local config first $pval = $this->getLocalConfig($key); // then per-project config if ($pval === null) { $pval = $this->getConfig($key); } // Test for older names in the per-project config only, since // they've only been used there static $deprecated_names = array('lint.engine' => 'lint_engine', 'unit.engine' => 'unit_engine'); if ($pval === null && isset($deprecated_names[$key])) { $pval = $this->getConfig($deprecated_names[$key]); } // lastly, try global (i.e. user-level) config if ($pval === null) { $global_config = ArcanistBaseWorkflow::readGlobalArcConfig(); $pval = idx($global_config, $key); } if ($pval === null) { $system_config = ArcanistBaseWorkflow::readSystemArcConfig(); $pval = idx($system_config, $key); } if ($pval === null) { $pval = $default; } return $pval; }
public function resolveBaseCommit() { $working_copy = $this->getWorkingCopyIdentity(); $global_config = ArcanistBaseWorkflow::readGlobalArcConfig(); $system_config = ArcanistBaseWorkflow::readSystemArcConfig(); $parser = new ArcanistBaseCommitParser($this); $commit = $parser->resolveBaseCommit(array('args' => $this->getBaseCommitArgumentRules(), 'local' => $working_copy->getLocalConfig('base', ''), 'project' => $working_copy->getConfig('base', ''), 'global' => idx($global_config, 'base', ''), 'system' => idx($system_config, 'base', ''))); return $commit; }
/** * Read a configuration directive from any available configuration source. * In contrast to @{method:getConfig}, this will look for the directive in * local and user configuration in addition to project configuration. * The precedence is local > project > user * * @param key Key to read. * @param wild Default value if key is not found. * @return wild Value, or default value if not found. * * @task config */ public function getConfigFromAnySource($key, $default = null) { $settings = new ArcanistSettings(); // try runtime config first $pval = idx($this->runtimeConfig, $key); // try local config if ($pval === null) { $pval = $this->getLocalConfig($key); } // then per-project config if ($pval === null) { $pval = $this->getConfig($key); } // now try global (i.e. user-level) config if ($pval === null) { $global_config = ArcanistBaseWorkflow::readGlobalArcConfig(); $pval = idx($global_config, $key); } // Finally, try system-level config. if ($pval === null) { $system_config = ArcanistBaseWorkflow::readSystemArcConfig(); $pval = idx($system_config, $key); } if ($pval === null) { $pval = $default; } else { $pval = $settings->willReadValue($key, $pval); } return $pval; }