This is _extremely_ rough, but I feel like it's a worthwhile proof of
concept to help us push interfaces in the direction required to just
make this work for real.
This is based in part of work I did years ago in hgit, but it's mostly
new code since I'm using pygit2 instead of dulwich and the hg storage
interfaces have improved. Some cleanup of old hgit code by Pulkit,
which I greatly appreciate.
test-git-interop.t does not cover a whole lot of cases, but it
passes. It includes status, diff, making a new commit, and `hg
annotate` working on the git repository.
This is _not_ production quality code: this is an experimental hack to
try and push us towards this approach over the hg-git approach. Known
technical debt lurking in this implementation:
* Writing bookmarks just totally ignores transactions.
* Manifest recursion is probably wrong.
* Manifest writing should be cleaned up to split mutable and
immutable manifest contexts.
* The way progress is threaded down into the gitstore is awful.
* Ideally we'd find a way to incrementally reindex DAGs. I'm not sure
how to do that efficiently, so we might need a "known only fast-forwards"
mode on the DAG indexer for use on `hg commit` and friends.