]> khamidou — GitHub mirrors - arcanist.git/commit
Enrich arc configuration and add stronger typing
authorepriestley <git@epriestley.com>
Thu, 26 Jul 2012 01:37:09 +0000 (18:37 -0700)
committerepriestley <git@epriestley.com>
Thu, 26 Jul 2012 01:37:09 +0000 (18:37 -0700)
commit768a125b584630082f6e73fdd9ada0f8eb6aae9b
tree3bf4e3c2e0d94dc0f924a6ee882afed5f36998a9
parent11d0331d21f6d46b37eb80b27a0e5c947f3fe48b
Enrich arc configuration and add stronger typing

Summary:
See <https://github.com/facebook/arcanist/issues/45>

Currently, when the user types `arc set-config x false`, we set it as the string "false", which is usually not desirable. We have some steps toward typed config already, but expand on what we have and move as much stuff as possible into it, including all the config settings that aren't currently documented (there are still some lint-specific and project-specific settings not present here, but this is most of it).

Also make the `phutil_libraries` key a legacy name for `load`, and `immutable_history` a legacy name for `history.immutable`. Generally the goal here is to make config simpler and bring it more in-line with Git/Mercurial, which use dotted hierarchies.

I'll add some documentation here but I think most of the changes should be fairly straightforward.

Test Plan:
  - `arc set-config history.immutable on` (And similar -- sets to boolean true.)
  - `arc set-config history.immutable off` (And similar -- sets to boolean false.)
  - `arc set-config history.immutable derp` (And similar -- raises exception.)
  - `arc set-config history.immutable ''` (And similar -- removes setting value.)
  - `arc set-config --show`
  - `arc get-config`
  - `arc get-config base`

Reviewers: dschleimer, bos, btrahan, vrana

Reviewed By: dschleimer

CC: aran
Maniphest Tasks: T1546

Differential Revision: https://secure.phabricator.com/D3045
scripts/arcanist.php
src/__phutil_library_map__.php
src/configuration/ArcanistSettings.php [new file with mode: 0644]
src/workflow/ArcanistBaseWorkflow.php
src/workflow/ArcanistGetConfigWorkflow.php
src/workflow/ArcanistSetConfigWorkflow.php
src/workingcopyidentity/ArcanistWorkingCopyIdentity.php