mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
b0cb300af8
Summary: The goal of the whole stack is quite simple (add reponame field to BlobRepo), but this stack also tries to make it easier to initialize BlobRepo. To do that BlobrepoBuilder was added. It now accepts RepoConfig instead of 6 different fields from RepoConfig - that makes it easier to pass a field from config into BlobRepo. It also allows to customize BlobRepo. Currently it's used just to add redaction override, but later we can extend it for other use cases as well, with the hope that we'll be able to remove a bunch of repo-creation functions from cmdlib. Because of BlobrepoBuilder we no longer need open_blobrepo function. Later we might consider removing open_blobrepo_given_datasources as well. Note that this diff *adds* a few new clones. I don't consider it being a big problem, though I'm curious to hear your thoughts folks. Note that another option for the implementation would be to take a reference to objects instead of taking them by value. I briefly looked into how they used, and lot of them are passed to the objects that actually take ownership of what's inside these config fields. I.e. Blobstore essentially takes ownership of BlobstoreOptions, because it needs to store manifold bucket name. Same for scuba_censored_table, filestore_params, bookmarks_cache_ttl etc. So unless I'm missing anything, we can either pass them as reference and then we'll have to copy them, or we can just pass a value from BlobrepoBuilder directly. Reviewed By: krallin Differential Revision: D20312567 fbshipit-source-id: 14634f5e14f103b110482557254f084da1c725e1 |
||
---|---|---|
.. | ||
blobsync/src | ||
changeset_fetcher/src | ||
errors/src | ||
factory/src | ||
repo_blobstore/src | ||
src | ||
test |