This is an archive of the discontinued Mercurial Phabricator instance.

py3: use %d in a few places
ClosedPublic

Authored by indygreg on Oct 12 2018, 1:25 PM.

Details

Summary

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

indygreg created this revision.Oct 12 2018, 1:25 PM
pulkit accepted this revision.Oct 12 2018, 4:34 PM
This revision was automatically updated to reflect the committed changes.
yuja added a subscriber: yuja.Oct 13 2018, 12:18 AM
  • time = str(sample.time)

+ time = sample.time

stack = sample.stack
sites = ['\1'.join([s.path, str(s.lineno), s.function])
         for s in stack]
  • file.write("%s\0%s\n" % (time, '\0'.join(sites)))

+ file.write("%d\0%s\n" % (time, '\0'.join(sites)))

I guess time is a floating-point value. b"%r" can be used in which case.