This is an archive of the discontinued Mercurial Phabricator instance.

git: pass `id` attribute of `pygit2.Tree` object
ClosedPublic

Authored by sheehan on Sep 22 2020, 9:40 AM.

Details

Summary

pygit2's Repository object expects an instance of Oid
to return the corresponding object, instead of the object
itself.

After this change and D9062, hg commit -i seems to work,
unless it hits a case folding assertion (ie trying to add
a file like README.md).

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

sheehan created this revision.Sep 22 2020, 9:40 AM

There are test failures on test-git-interop.t that also fail on 89f0d9f87701cb, but I'm pretty sure this doesn't break anything.

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.

All tests are passing for me under python3, including with this patch. Pushed, thanks!

(Can I interest you in a follow-up to cover this for hg commit -i somehow?)