mirror of
https://github.com/facebook/sapling.git
synced 2024-12-27 23:22:02 +03:00
configs: move dynamicconfig to be before system configs
Summary: We want to eventually get rid of system and repo configs, but for now they should take precedence over the dynamicconfigs. Previously we relied on validation to remove any entries from dynamicconfig that interferes with a system rc config, but in some code paths we didn't run that validation (like if we loaded configs purely from Rust). Let's just make dynamicconfig load before system configs. If validation doesn't run, we might miss the case where dynamicconfig sets a value and the system rc doesn't. But that's probably fine. Reviewed By: quark-zju Differential Revision: D23305711 fbshipit-source-id: 77b5f49d348cfa116694a641ed17e6d1184a81ab
This commit is contained in:
parent
d643f48c8c
commit
18b20f4b24
@ -255,10 +255,10 @@ impl ConfigSetHgExt for ConfigSet {
|
||||
if std::env::var(HGRCPATH).is_err() {
|
||||
errors.append(&mut self.parse(MERGE_TOOLS_CONFIG, &"merge-tools.rc".into()));
|
||||
}
|
||||
errors.append(&mut self.load_system(opts.clone()));
|
||||
if let Some(repo_path) = repo_path {
|
||||
errors.append(&mut self.load_dynamic(&repo_path, opts.clone())?);
|
||||
}
|
||||
errors.append(&mut self.load_system(opts.clone()));
|
||||
errors.append(&mut self.load_user(opts.clone()));
|
||||
|
||||
if let Some(repo_path) = repo_path {
|
||||
|
Loading…
Reference in New Issue
Block a user