Fix a regression fetching files on GitLab.

Review Request #9849 — Created April 1, 2018 and submitted

Information

Review Board
release-3.0.x
d7d7906...

Reviewers

Blob lookups for GitLab were using the wrong path on API v4. The blob
URL path used if a base commit ID wasn't specified had changed on v4.
The URL used when there is a base commit ID remains the same, but the
documentation isn't clear about whether the ?filepath argument was
still valid, and in testing it doesn't appear to have worked.

This uses the modern path on API v4, and adds unit tests for file
fetching and existence checks. The unit tests are a bit verbose,
but will be slimmed down with the upcoming hosting service test work.

Unit tests pass.

Manually tested this function on a production server in a shell (by
monkey patching). Verified a previously-failed fetch was now working.

david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (a199264)