protected $localConfig;
protected $projectConfig;
+ protected $runtimeConfig;
protected $projectRoot;
public static function newDummyWorkingCopy() {
$this->projectRoot = $root;
$this->projectConfig = $config;
$this->localConfig = array();
+ $this->runtimeConfig = array();
$vc_dirs = array(
'.git',
public function getConfigFromAnySource($key, $default = null) {
$settings = new ArcanistSettings();
- // try local config first
- $pval = $this->getLocalConfig($key);
+ // 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) {
}
+ /**
+ * Sets a runtime config value that takes precedence over any static
+ * config values.
+ *
+ * @param key Key to set.
+ * @param value The value of the key.
+ *
+ * @task config
+ */
+ public function setRuntimeConfig($key, $value) {
+ $this->runtimeConfig[$key] = $value;
+
+ return $this;
+ }
+
}