Fix a protocol bug in `GopkgInFetcher` for v0's.

Review Request #2857 - Created Sept. 22, 2015 and submitted

Information
John Sirois
pants
jsirois/issues/2233
2233, 2234
2854
f15a639...
Reviewers
pants-reviews
kwlzn, mateor, zundel
Previously the `GopkgInFetcher` always fetched the 'master' branch for
v0 packages.  The spec only suggests 'master' as the fallback for v0's
when no v0 matching branch or tag can be found, see the 'Version Zero'
section here:
  http://labix.org/gopkg.in

This change fixes up the fetcher to meet the spec and adds tests for
the v0 cases.

 contrib/go/examples/3rdparty/go/gopkg.in/fsnotify.v0/BUILD                | 14 ++++++++++++++
 contrib/go/src/python/pants/contrib/go/subsystems/fetchers.py             | 11 +++++++----
 contrib/go/tests/python/pants_test/contrib/go/subsystems/test_fetchers.py | 26 ++++++++++++++++++++++++++
 3 files changed, 47 insertions(+), 4 deletions(-)
Ran green locally: `./pants clean-all test contrib/go/::`

Also compiled the `contrib/go/examples/3rdparty/go/gopkg.in/fsnotify.v0`
target with the rev commented out, which selected `v0.9.3` as expected.

CI went green here:
  https://travis-ci.org/pantsbuild/pants/builds/81636557
Vinny Fuentes
Kris Wilson
John Sirois
John Sirois
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...