Ref T9524. This updates data but doesn't do anything interesting yet. The next change will add a UI for it. See discussion in D14803.
After coverage data is written, aggregate coverage for all affected ancestors. This diff does it in an easy way that's probably not too horrible:
- Load all coverage data.
- Figure out how much of it is relevant.
- Update that.
I think that'll probably be OK even for large repositories (i.e., require tens of megabytes, not tens of gigabytes).
The aggregate data is stored in a special way, since I had to be able to exclude it from the query anyway and this is more efficient. It looks like this:
+J{"U":5,"C":7,"N":0,"X":0}
The + is a signal that it's aggregate, the "J" is identifying the rest of the string as JSON, and then the counts follow in JSON format.