shurcooL/Go-Package-Store — pull request #22 by shurcooL (2014-10-22 03:17:23+00:00)
Title: Improve code.google.com presenter to fetch changes when needed.

We're using a remote vcsstore to fetch changes for `code.google.com/p/...` repos. Sometimes that vcsstore is not yet aware of an update, and previously Go Package Store would be unable to present a detailed list of changes.

This change allows it to try a second time after a `CloneOrUpdate()` call, which should fetch the updates and allow the list of changes to be presented.

@sqs, if you could quickly eyeball this and give it an ok, that'd be great. I've benchmarked it and doing the POST (aka `CloneOrUpdate`) is pretty expensive and takes 800~ ms every time. That's why I opt to do it only when the first query of the latest commit fails.