I did not test this. I am merging it anyway because the code change is simple enough to understand, and the possible negative side effects are limited to styling.
In 18cc0ed2dc
we separated the coverage data from the changesets object.
This caused the coverage data not being cached.
This commit adds support for caching the coverage data in a generic way.
In the past we used to determine if a changeset was to show by doing this check:
```javascript
mapToArray(changesets).filter(c => c.hidden === false)
```
We then switched to:
```javascript
coverageMap[cset.node].summary !== PENDING
```
This adds a `show` property and we check on it:
```javascript
coverageMap[cset.node].show
```
There was a mix of `repoName` versus `repoPath` in the signature of
various signatures.
Since this is not a feature that we really support (switch between repos)
let's be consistent and not have to pass it around as a property.
This will simplify getting coverage data needed on different views.
For instance, we should not need to fetch changeset data when
we already have the changeset's node available and we can directly
fetch the coverage data.
In a future pass we will now be able to store in the local cache the coverage data
separate from the changesets data.
We also drop the notion of hidden changesets since we were not
taking advantage of it.
This decouples all Mercurial logic from ChangesetsViewerContainer.
This enables other containers to fetch data from hg.mozilla.org
Only enable the cache when running on production.
Allow enabling the cache when doing local development with ENABLE_CACHE=true
Normally, from the SummaryViewer you should not be able to get to the DiffViewer since
there's no link to navigate to it.
However, people clicking on links from GitHub issues can reach the DiffViewer, thus,
failing because there `coverage` object contains a summary property rather than
being undefined.
This change shows an error message to the user letting them know that they should
try again later.
There's also some linting fixes in this change.
Query ActiveData by prefix matching revision number id. Add minimum revision number length check before AD query. Show error message if revision is too short.