This is an archive of the discontinued Mercurial Phabricator instance.

statprof: clean up unicode/bytes a little
ClosedPublic

Authored by durin42 on Nov 1 2018, 5:17 PM.

Details

Summary

I'm not really sure how this worked before, but something perturbed it
and what I've got in this change I believe is a little tidier. This
fixes test-profile.t on Python 3.

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

durin42 created this revision.Nov 1 2018, 5:17 PM
yuja added a subscriber: yuja.Nov 2 2018, 9:32 PM

Queued, thanks.

  • sitelabel = '%s:%d:%s' % (pycompat.fsencode(site.filename()),

+ sitelabel = '%s:%d:%s' % (site.filename(),

Maybe missing b'' ?

  • pycompat.sysbytes(site.function))

+ site.function)

fp.write(b'%6.2f %9.2f %9.2f  %s\n' % (
    stat.selfpercent(), stat.totalseconds(),
    stat.selfseconds(), sitelabel))
This revision was automatically updated to reflect the committed changes.