sapling/eden/docs/Config.md
Caren Thomas 670297fa88 add ClientConfig method that compiles repository data
Summary: Restructure the current logic used for loading the config data into a ClientConfig object. Rather than having loadFromClientDirectory iterate through all the config files and parse them to find the necessary information, abstract that logic out into a new method that compiles all of the relevant data so that all loadFromClientDirectory has to do is pull out the needed information. Since this change separates the two steps, this will make it easier to move the first step of compiling config information outside of ClientConfig - the goal here is to have the eden server load all of the config data at start up and cache it in memory so that it doesn't need to be done every time a ClientConfig object is created, and this change is an intermediate step.

Reviewed By: simpkins

Differential Revision: D3580757

fbshipit-source-id: c340a0fe715856066a554238249574f8177bc4d7
2016-08-05 12:50:29 -07:00

39 lines
1.3 KiB
Markdown

Eden Config Files
-----------------
The configuration parameters for Eden are stored in INI files. The default
'system' parameters are stored in the directory `/etc/eden/config.d/` and these
default parameters can be overridden by the user in the `~/.edenrc` user
configuration file.
When parsing configuration data, Eden loads everything in `/etc/eden/config.d/`
first, and then loads the data from `~/.edenrc` next. If the same section is
present in multiple files, the section found last wins, and entirely replaces
any contents of the section from previous files.
### Sample configuration file
***
```
[repository fbsource]
path = /data/users/$USER/fbsource
type = git
[bindmounts fbsource]
fbcode-buck-out = fbcode/buck-out
fbandroid-buck-out = fbandroid/buck-out
fbobjc-buck-out = fbobjc/buck-out
buck-out = buck-out
```
Each repository section includes the name of the repository in its header and
specifies the source of the repository in the 'path' field. The 'type' of the
repository must be either 'hg' or 'git.'
Each bindmounts section specifies the list of bindmounts corresponding to the
repository, where keys refer to the bind mount's directory name inside eden, and
values refer to the bind mount's mount path.
Please note that empty sections with only a header entry are not currently
supported.