This is an archive of the discontinued Mercurial Phabricator instance.

extensions: if on py3 and propname is a bytestr, convert to sysstr
ClosedPublic

Authored by durin42 on Aug 9 2017, 10:24 AM.

Details

Summary

Property names are unicodes on Python 3.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

durin42 created this revision.Aug 9 2017, 10:24 AM
yuja added a subscriber: yuja.Aug 9 2017, 11:17 AM
yuja added inline comments.
mercurial/extensions.py
388

pycompat.sysstr() ?

400

Perhaps this shouldn't be bytes. Needs r'' and drop _().

durin42 marked 2 inline comments as done.Aug 11 2017, 3:52 PM
durin42 retitled this revision from extensions: if on py3 and propname is a bytestr, decode as ascii to extensions: if on py3 and propname is a bytestr, convert to sysstr.
durin42 updated this revision to Diff 799.
durin42 added inline comments.Aug 11 2017, 3:52 PM
mercurial/extensions.py
400

Done in a followup change.

yuja added inline comments.Aug 12 2017, 6:21 AM
mercurial/extensions.py
388

The "if" shouldn't be necessary. That's what sysstr() is for.

durin42 marked 2 inline comments as done.Aug 15 2017, 4:18 PM
durin42 updated this revision to Diff 945.

Take another look?

This revision was automatically updated to reflect the committed changes.