utils: add a revert checker
Chrome OS and Android have found it useful to have an automated revert
checker. It was requested to upstream it, since other folks in the LLVM
community may also find value in it.
The tests depend on having a full (non-shallow) checkout of LLVM. This
seems reasonable to me, since:
- the tests should only be run if the user is developing on this script
- it's kind of hard to develop on this script without local git history :)
If people really want, the tests' dependency on LLVM's history can be
removed. It's mostly just effort/complexity that doesn't seem necessary.
Differential Revision: https://reviews.llvm.org/D105578