Page MenuHomePhabricator

git: RFC of a new extension to _directly_ operate on git repositories
Needs ReviewPublic

Authored by durin42 on Aug 16 2019, 4:54 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

durin42 created this revision.Aug 16 2019, 4:54 PM
durin42 edited the summary of this revision. (Show Details)
durin42 updated this revision to Diff 16293.
durin42 updated this revision to Diff 16387.Sep 5 2019, 3:20 PM
durin42 edited the summary of this revision. (Show Details)Sep 16 2019, 10:26 AM
durin42 updated this revision to Diff 16554.
durin42 edited the summary of this revision. (Show Details)Sep 25 2019, 6:14 PM
durin42 updated this revision to Diff 16622.
durin42 edited the summary of this revision. (Show Details)Sep 30 2019, 3:58 PM
durin42 updated this revision to Diff 16704.
durin42 updated this revision to Diff 16714.Sep 30 2019, 6:46 PM
durin42 updated this revision to Diff 16858.Oct 5 2019, 4:28 PM
durin42 edited the summary of this revision. (Show Details)Oct 9 2019, 5:28 PM
durin42 updated this revision to Diff 17007.