Page MenuHomePhabricator

py3: require values in changelog extras to be bytes
ClosedPublic

Authored by martinvonz on Wed, Mar 25, 10:19 PM.

Details

Summary

I don't know what happened here because b436059c1cca (py3: use
pycompat.bytestr() on extra values because it can be int, 2019-02-05)
came about b44a47214122 (py3: use string for "close" value in commit
extras, 2018-02-11). Whatever happened, we shouldn't need to convert
the values to bytes now. It's better to not convert because that might
cover up bugs where someone sets a unicode value in the extras and
that works until the unicode value happens to contain non-ascii (at
which point it will fail because bytestr() expects its argument to
be ascii if it's unicode).

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

martinvonz created this revision.Wed, Mar 25, 10:19 PM
pulkit accepted this revision.Thu, Mar 26, 4:45 AM
This revision is now accepted and ready to land.Thu, Mar 26, 4:45 AM
This revision was automatically updated to reflect the committed changes.