mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
config: change system config entry point
Summary: Change system config entry point to only `/etc/mercurial/system.rc` (unix) and `\ProgramData\Facebook\Mercurial\system.rc` (Windows) so they won't overlap with a vanilla Mercurial installation. Another goal of this change is to make it easier to drop the directory `%include` feature. So detecting config changes (for example, edenfs wants to make sure ignore rules are up-to-date) can be made cheaper by just stating files without `listdir`. Reviewed By: markbt Differential Revision: D13875656 fbshipit-source-id: 314c0bf87ff086dec5b88e232edca0133356484e
This commit is contained in:
parent
0ce06567ab
commit
9cdc2640d6
@ -185,8 +185,7 @@ impl ConfigSetHgExt for ConfigSet {
|
||||
#[cfg(unix)]
|
||||
{
|
||||
errors.append(&mut self.load_path(data_dir.join("default.d/"), &opts));
|
||||
errors.append(&mut self.load_path("/etc/mercurial/hgrc", &opts));
|
||||
errors.append(&mut self.load_path("/etc/mercurial/hgrc.d/", &opts));
|
||||
errors.append(&mut self.load_path("/etc/mercurial/system.rc", &opts));
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
@ -194,9 +193,7 @@ impl ConfigSetHgExt for ConfigSet {
|
||||
errors.append(&mut self.load_path(data_dir.join("default.d/"), &opts));
|
||||
if let Ok(program_data_path) = env::var("PROGRAMDATA") {
|
||||
let hgrc_dir = Path::new(&program_data_path).join("Facebook\\Mercurial");
|
||||
errors.append(&mut self.load_path(hgrc_dir.join("mercurial.ini"), &opts));
|
||||
errors.append(&mut self.load_path(hgrc_dir.join("hgrc"), &opts));
|
||||
errors.append(&mut self.load_path(hgrc_dir.join("hgrc.d/"), &opts));
|
||||
errors.append(&mut self.load_path(hgrc_dir.join("system.rc"), &opts));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user