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):
* fix bookmarks handling
* more of the filelog story (what I've got is very crude and incomplete)
* clean up the manifest code
* tighter control over timestamps in created git commit objects (pygit2
seems to not expose access to the committer timestamp, perturbing hashes etc)
This is _not_ production quality code: this is an experimental hack to
try and push us towards this approach over the hg-git approach.