On the 1.8.x-issue4400 branch, merge r1507567 and r1507589 from trunk.

Only a minor conflict in commit_tests.py due to a test on trunk that isn't on
1.8.x


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/1.8.x-issue4400@1507594 13f79535-47bb-0310-9956-ffa450edef68