Fix getting the last known revision for a repo

We noticed the compare link from #105 not showing, and realised that it's always using the production revision to compare against.