Commit Graph

8 Commits

Author SHA1 Message Date
Wez Furlong
da904dd4a5 make mononoke tier configurable
Summary: This was previously hard coded and making it configurable is operationally desirable.

Reviewed By: chadaustin

Differential Revision: D10298279

fbshipit-source-id: 124c3fa319c44aacb3d17ef6e380e9dec49db8be
2018-10-10 14:47:08 -07:00
Wez Furlong
35b902fdc2 fix toml config parsing issue with booleans
Summary:
Unfortunately, our current config parsing implementation is
forcing us to stringly-type all data, which partially defeats one
of the benefits of using a modern typed configuration file format
such as TOML.

This means that boolean options have to be specified as strings in
the config file.

I don't want to ship the Mononoke feature integration out and tell
folks to use `"true"` to turn it on as it will impose a future migration
concern on us.

This diff does the simple but gross thing: at parse time, rather than
ignoring boolean values, we convert them to string so that the upper
layer can convert them to bools again.

Reviewed By: strager

Differential Revision: D9582582

fbshipit-source-id: a8eb8a8e4b59e3d74b3371b743a6eb590b3b0f58
2018-08-31 13:07:52 -07:00
Zeyi Fan
96c7bb1c5f read use-mononoke and client-certificate in edenfs
Summary: This commit let `HgImporter` pick up configuration values from `EdenConfig`.

Reviewed By: chadaustin

Differential Revision: D9346293

fbshipit-source-id: cb63f7d13a86058e9bf076eddb52212560a64cb1
2018-08-20 11:22:14 -07:00
Zeyi Fan
10dfcf8da4 add two new configuration value for Mononoke
Summary: This commit adds two configurable value for setting path to client certificate and a flag to control Mononoke integration.

Reviewed By: chadaustin

Differential Revision: D9303157

fbshipit-source-id: 2f44d55d17b567655157a5f4b6f52e9468dda234
2018-08-15 10:51:44 -07:00
Eamonn Kent
b857159384 Allow USER and HOME to be interpolated in Eden c++ code
Summary:
The python code supports expansion of ${HOME} and ${USER} in the config files.
Some of the config files use these values. This adds support for their
interpolation.

Reviewed By: chadaustin

Differential Revision: D9160960

fbshipit-source-id: 9133ee247c17937c9d8d548b9bfd26559a1459e9
2018-08-06 13:53:07 -07:00
Eamonn Kent
a5591d7a31 consistent naming for userIgnoreFile
Summary:
Let's use consistent naming for the user ignore file. We will go with
'userIgnoreFile' as recomended. There is now symetry since we have
'systemIgnoreFile'.

I have another diff (later) that already uses the 'userIgnoreFile'.

Reviewed By: chadaustin

Differential Revision: D8823906

fbshipit-source-id: 47594e8971fa4db809821fc819da05e9eb2c5277
2018-07-13 10:51:08 -07:00
Eamonn Kent
bb9c1817de Improve file change detection precision in EdenConfig
Summary:
EdenConfig uses stat to determine if config files have change. However, it
should use st_mtim.tv_nsec rather than st_mtime because this provides
nano-second resolution.

Reviewed By: simpkins

Differential Revision: D8797143

fbshipit-source-id: aadf114f509116d497a4c237ecaf108eb3824d5f
2018-07-11 15:06:31 -07:00
Eamonn Kent
601c5ea1e5 Support loading of system wide and users eden config files
Summary:
This commit focuses on the following functionality:
    - Eden configuration should have reasonable default values.
    - Eden should allow configuration to be specified in various manners: default, cli, user and system configuration files.
    - Configuration values should have the following precedence (hi to low): cli,
      user config, system config, default.
    - A light-weight mechanism is required to detect and update configuration changes.

Reviewed By: simpkins

Differential Revision: D8594297

fbshipit-source-id: ed195212669b18b450a1eae359e4d23905beadb4
2018-07-09 16:54:11 -07:00