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 fully pass, and this exposes some pretty
rough edges on some of our interfaces (eg bookmarks need to be
reworked to be clean, dirstate needs to be indirected and given a
proper interface), but overall as an RFC I feel like this is a good
To get this test to pass, we need to figure out (at minimum):
* writing back to git dirstate objects (aka the index)
* fix bookmarks handling
* creating commits (which implies moving refs)
* fill in more of the filelog implementation, including linkrevs
This is _not_ production quality code: this is an experimental hack to
try and push us towards this approach over the hg-git approach.