mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
d48c87a95e
Summary: `MononokeMegarepoConfig` is going to be a single point of access to config storage system - provide both writes and reads. It is also a trait, to allow for unit-test implementations later. This diff introduces a trait, as well as implements the write side of the configerator-based implementor. The read side/oss impl/test impl is left `unimplemented`. Read side and test impl will be implemented in the future. Things I had to consider while implementing this: - I wanted to store each version of `SyncTargetConfig` in an individual `.cconf` in configerator - at the same time, I did not want all of them to live in the same dir, to avoid having dirs with thousands of files in it - dir sharding uses sha1 of the target repo + target bookmark + version name, then separates it into a dir name and a file name, like git does - this means that these `.cconf` files are not "human-addressable" in the configerator repo - to help this, each new config creation also creates an entry in one of the "index" files: human-readable maps from target + version name to a corresponding `.cconf` - using a single index file is also impractical, so these are separated by ascification of the repo_id + bookmark name Note: this design means that there's no automatic way to fetch the list of all targets in use. This can be bypassed by maintaining an extra index layer, whihc will list all the targets. I don't think this is very important atm. Reviewed By: StanislavGlebik Differential Revision: D27795663 fbshipit-source-id: 4d824ee4320c8be5187915b23e9c9d261c198fe1 |
||
---|---|---|
.. | ||
git_types | ||
git-pool | ||
gitimport | ||
import_tools |