This is an archive of the discontinued Mercurial Phabricator instance.

py3: ensure hashes are bytes in sparse.py
AbandonedPublic

Authored by indygreg on Nov 21 2017, 2:53 AM.

Details

Reviewers
yuja
Group Reviewers
hg-reviewers
Summary

hashlib's .hexdigest() returns a unicode in Python 3. We need to use
bytes to make the rest of Mercurial happy.

This was in the top #25 crashes in Python 3.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Nov 21 2017, 2:53 AM
yuja added a subscriber: yuja.Nov 21 2017, 7:41 AM

We can do nodemod.hex(h.digest()) instead.

yuja requested changes to this revision.Dec 1 2017, 9:31 PM
This revision now requires changes to proceed.Dec 1 2017, 9:31 PM
indygreg abandoned this revision.Jan 14 2018, 2:41 PM

This was addressed in D1792.