scmstore: fix edenapi for eagerepo tests

Summary: Now scmstore only checks remotefile.http when deciding whether to use edenapi. Notably it no longer checks for edenapi.url, which isn't/doesn't need to be set for eagerepo.

Reviewed By: DurhamG

Differential Revision: D35985479

fbshipit-source-id: 0789fe0694b668143552198f29256bb5b4f8d5d3
This commit is contained in:
Muir Manders 2022-05-12 16:52:14 -07:00 committed by Facebook GitHub Bot
parent 281da7b4f7
commit 89f910a64f

View File

@ -583,13 +583,5 @@ impl<'a> TreeStoreBuilder<'a> {
}
fn use_edenapi_via_config(config: &dyn Config) -> Result<bool> {
let use_edenapi = config.get_or_default::<bool>("remotefilelog", "http")?
// EdenApi client cannot be initialized if reponame or url is missing.
// In some tests (ex. scm/lib), remotefilelog.http is true but the reponame is empty.
&& !config
.get("remotefilelog", "reponame")
.unwrap_or_default()
.is_empty()
&& !config.get("edenapi", "url").unwrap_or_default().is_empty();
Ok(use_edenapi)
Ok(config.get_or_default("remotefilelog", "http")?)
}