Fix migrate_config to detect explicit [DEFAULT]s.

Review Request #2465 - Created July 11, 2015 and submitted

John Sirois
1758, 1798
Previously it was using a public ConfigParser API and a private
ConfigParser data structure - both of which did not include the
'DEFAULT' section by design.

 migrations/options/src/python/ | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

I reproed the case
with a local diff of:

diff --git a/pants.ini b/pants.ini
index 51aa086..5961063 100644
--- a/pants.ini
+++ b/pants.ini
@@ -9,6 +9,11 @@
 #   pants_workdir: the scratch space used to for live builds in this repo

+read_artifact_caches: ["/mnt/nfs/shared-cache/pants-artifact-cache", ""]
+read_from_artifact_cache: true
+write_artifact_caches: ["/mnt/nfs/shared-cache/pants-artifact-cache", ""]
+write_to_artifact_cache: true

This led to the following check results with the new code:

Checking config file at ./pants.ini for unmigrated keys.
Found write_to_artifact_cache in section [DEFAULT]. Should be write in section [cache].
Found read_from_artifact_cache in section [DEFAULT]. Should be read in section [cache].
Found read_artifact_caches in section [DEFAULT]. Should be read_from in section [cache].
Found write_artifact_caches in section [DEFAULT]. Should be write_to in section [cache].
Found jvm_options in section [DEFAULT]. Should be options in section [jvm].

The 1st 4 messages are what were expected, the last seems unexpected except
that the migration has been partially done, with the legacy option left in
place pending full code migration to jvm subsystem as commented in

CI went green here:

John Sirois
Eric Ayers
Benjy Weinberger
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)