Handle typed values much better in get-siteconfig and set-siteconfig.

Review Request #7311 — Created May 17, 2015 and submitted — Latest diff uploaded

Information

Djblets
release-0.8.x
1c27326...

Reviewers

Our siteconfig management commands did pretty well for string values, but they
had several issues for other types:

  • get-siteconfig would fail with an exception for any value that wasn't a
    string.
  • set-siteconfig wouldn't understand anything but "0" and "1" for boolean
    values, despite list-siteconfig printing "true" and "false".
  • set-siteconfig was unable to set a key to None.

I've made several changes to address these issues. The one complication is that
in our type detection, for any type that doesn't have a default value, we have
to make a leap of faith that the passed-in value should be a string. This isn't
terribly common but does show up with some of the LDAP attributes.

Ran through all test cases listed in the attached bug.

    Loading...