This uses a Fact engine that operates on PhabricatorRepositoryBranch to report historical information into Fact.
Notable changes are:
- fact_raw and fact_aggregate gained a stringA field, which is used to store a grouping / filtering string value against facts (used for paths in this case).
- PhabricatorRepositoryBranch gained a PHID, which is used so we can store facts against a branch.
- The string value can be filtered on through the Fact UI.
The rest of it was pretty straight forward in terms of emitting facts from the engine. The only remaining problem is that Fact by default removes old raw entries for objects before updating them; in the case of branches we actually want to keep older entries. Since there didn't seem to be a simple way of specifying this in the architecture, I need feedback on how to tackle this issue.