Fix isort in git hook context.

Review Request #2430 - Created June 30, 2015 and submitted

Information
John Sirois
pants
jsirois/isseus/1408
1408, 1737, 1753
6cb5811...
Reviewers
pants-reviews
stuhood, zundel
The isort pre-commit fails to find nested .isort.cfg files when run via
python subprocess commits during `./pants publish`.  This fix adds an
explicit GIT_HOOK mode that uses an isort git_hook API instead of the
isort script which runs without false negatives both as a normally
executed hook and via more complex python subprocess git call.

 build-support/bin/isort.sh      | 21 +++++++++++++++++++--
 build-support/bin/pre-commit.sh |  5 +++--
 2 files changed, 22 insertions(+), 4 deletions(-)
A few local hacks to the JarPublish task to allow publishing with commits
when not on master.  These allowed for `./pants publish.jar --local=...`
testing that failed before the fix with spurious isort failures and
succeeded after the fix.

CI went green here:
  https://travis-ci.org/pantsbuild/pants/builds/69067486
John Sirois
Stu Hood
Eric Ayers
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...