Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14077010
D15342.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D15342.diff
View Options
diff --git a/src/configuration/ArcanistConfigurationManager.php b/src/configuration/ArcanistConfigurationManager.php
--- a/src/configuration/ArcanistConfigurationManager.php
+++ b/src/configuration/ArcanistConfigurationManager.php
@@ -100,7 +100,17 @@
}
$user_config = $this->readUserArcConfig();
- $pval = idx($user_config, $key);
+
+ // For "aliases" coming from the user config file specifically, read the
+ // top level "aliases" key instead of the "aliases" key inside the "config"
+ // setting. Aliases were originally user-specific but later became standard
+ // configuration, which is why this works oddly.
+ if ($key === 'aliases') {
+ $pval = idx($this->readUserConfigurationFile(), $key);
+ } else {
+ $pval = idx($user_config, $key);
+ }
+
if ($pval !== null) {
$results[self::CONFIG_SOURCE_USER] =
$settings->willReadValue($key, $pval);
diff --git a/src/workflow/ArcanistAliasWorkflow.php b/src/workflow/ArcanistAliasWorkflow.php
--- a/src/workflow/ArcanistAliasWorkflow.php
+++ b/src/workflow/ArcanistAliasWorkflow.php
@@ -59,17 +59,14 @@
public static function getAliases(
ArcanistConfigurationManager $configuration_manager) {
+ $sources = $configuration_manager->getConfigFromAllSources('aliases');
- $working_copy_config_aliases =
- $configuration_manager->getProjectConfig('aliases');
- if (!$working_copy_config_aliases) {
- $working_copy_config_aliases = array();
+ $aliases = array();
+ foreach ($sources as $source) {
+ $aliases += $source;
}
- $user_config_aliases = idx(
- $configuration_manager->readUserConfigurationFile(),
- 'aliases',
- array());
- return $user_config_aliases + $working_copy_config_aliases;
+
+ return $aliases;
}
private function writeAliases(array $aliases) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 8:56 PM (3 h, 30 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6775933
Default Alt Text
D15342.diff (1 KB)
Attached To
Mode
D15342: Read arc aliases from all available configuration files
Attached
Detach File
Event Timeline
Log In to Comment