repo_import: remove dangerous_override

Summary:
This dangerous override was being used to override
derived data config.  Replace it with customizing the
config in the factory.

Reviewed By: krallin

Differential Revision: D27424696

fbshipit-source-id: 6dcf0c1397e217f09c0b82cf4700743c943f506f
This commit is contained in:
Mark Juggurnauth-Thomas 2021-04-07 13:59:27 -07:00 committed by Facebook GitHub Bot
parent 53550b9f10
commit c80d5c9149
2 changed files with 8 additions and 10 deletions

View File

@ -42,7 +42,6 @@ topo_sort = { version = "0.1.0", path = "../common/topo_sort" }
[dev-dependencies]
ascii = "1.0"
blobrepo_override = { version = "0.1.0", path = "../blobrepo/override" }
cached_config = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master" }
derived_data = { version = "0.1.0", path = "../derived_data" }
fbinit-tokio-02 = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "master" }

View File

@ -16,7 +16,6 @@ mod tests {
use anyhow::Result;
use ascii::AsciiString;
use blobrepo::BlobRepo;
use blobrepo_override::DangerousOverride;
use blobstore::Loadable;
use bookmarks::{BookmarkName, BookmarkUpdateReason, Freshness};
use cached_config::{ConfigStore, TestSource};
@ -37,7 +36,7 @@ mod tests {
use mercurial_types_mocks::nodehash::ONES_CSID as HG_CSID;
use metaconfig_types::{
CommitSyncConfig, CommitSyncConfigVersion, CommitSyncDirection,
DefaultSmallToLargeCommitSyncPathAction, DerivedDataConfig, PushrebaseParams, RepoConfig,
DefaultSmallToLargeCommitSyncPathAction, PushrebaseParams, RepoConfig,
SmallRepoCommitSyncConfig,
};
use mononoke_hg_sync_job_helper_lib::LATEST_REPLAYED_REQUEST_KEY;
@ -69,15 +68,15 @@ mod tests {
fn create_repo(id: i32) -> Result<BlobRepo> {
let repo: BlobRepo = TestRepoFactory::new()?
.with_config_override(|config| {
config
.derived_data_config
.enabled
.types
.remove(TreeHandle::NAME);
})
.with_id(RepositoryId::new(id))
.build()?;
let repo = repo.dangerous_override(|mut derived_data_config: DerivedDataConfig| {
derived_data_config
.enabled
.types
.remove(&TreeHandle::NAME.to_string());
derived_data_config
});
Ok(repo)
}