( )⚙ D1795 py3: use pycompat.bytestr() instead of str()

This is an archive of the discontinued Mercurial Phabricator instance.

py3: use pycompat.bytestr() instead of str()
ClosedPublic

Authored by pulkit on Dec 28 2017, 7:49 PM.

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

pulkit created this revision.Dec 28 2017, 7:49 PM
durin42 accepted this revision.Jan 10 2018, 5:56 PM
This revision is now accepted and ready to land.Jan 10 2018, 5:56 PM
This revision was automatically updated to reflect the committed changes.
yuja added a subscriber: yuja.Jan 11 2018, 9:34 AM

bytes() or "%d" is preferred. Can you send a follow up?

In D1795#31282, @yuja wrote:

bytes() or "%d" is preferred. Can you send a follow up?

I am not sure which one needs to be changed.

yuja added inline comments.Jan 12 2018, 7:24 AM
mercurial/subrepo.py
392

bytes()

399

bytes()

mercurial/verify.py
110

'%d', perhaps.

pulkit added inline comments.Jan 12 2018, 8:34 AM
mercurial/verify.py
110

Looks like we cannot use "%d" here as None can be possible value also and test-treemanifest.t has tests with None as a part of output.

yuja added inline comments.Jan 12 2018, 8:41 AM
mercurial/verify.py
110

Ugh, it smells, but let's just leave it for now.