This is an archive of the discontinued Mercurial Phabricator instance.

hgext.git: decode node IDs back into Python strings (issue6349)
ClosedPublic

Authored by hollisb on Jun 9 2020, 4:49 PM.

Details

Summary

db.text_factory = bytes, so the database contains only strings. The object IDs
we get from pygit2 are Python strings. b'foo' != 'foo'

This change allows the "don't reindex" optimization to work by allowing the
"cur_cache_heads == cache_heads" comparison a few lines down to succeed.

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.