HomePhabricator

[Wilds] When reading ".arcrc" files, modernize the data we read in-process if…

Description

[Wilds] When reading ".arcrc" files, modernize the data we read in-process if they're in an older format on disk

Summary:
See T13098. All ".arcconfig" files except "~/.arcrc" have config keys at top level.

"~/.arcrc" previously had "aliases" at top level, and currently has "hosts" at top level. "aliases" became standard configuration. I'd like to make "hosts" standard configuration too -- one reason to do this is to make automation with --config-file easier, so you can shove API tokens in a file somewhere (and not need a home directory). Another reason is just to standardize things.

If we read "~/.arcrc" and see a "config" key, put all those keys at top level and then fill in anything else left over so we end up with ~/.arcrc that effectively looks like other "arcconfig" files. I'd possibly like to rename this file to "arcconfig" at some point, too, but that can happen later.

Test Plan: Ran arc get-config, which barely works, but now read my ~/.arcrc somewhat more successfully.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D19696