# HG changeset patch # User Joerg Sonnenberger # Date 1588359937 -7200 # Node ID fbe07b1cf5d4d228accfcbdbc49fbee320a7b981 # Parent 9035901412e6827eb5a35a71f9eb40184d812c29 py3: fix debugstablerangecache diff -r 9035901412e6 -r fbe07b1cf5d4 hgext3rd/evolve/stablerangecache.py --- a/hgext3rd/evolve/stablerangecache.py Wed Apr 29 00:44:14 2020 +0800 +++ b/hgext3rd/evolve/stablerangecache.py Fri May 01 21:05:37 2020 +0200 @@ -436,18 +436,18 @@ unfi = repo.unfiltered() revs = unfi.revs('all()') nbrevs = len(revs) - ui.write('number of revisions: %12d\n' % nbrevs) + ui.write(b'number of revisions: %12d\n' % nbrevs) heads = unfi.revs('heads(all())') nbheads = len(heads) - ui.write('number of heads: %12d\n' % nbheads) + ui.write(b'number of heads: %12d\n' % nbheads) merge = unfi.revs('merge()') nbmerge = len(merge) - ui.write('number of merge: %12d (%3d%%)\n' + ui.write(b'number of merge: %12d (%3d%%)\n' % (nbmerge, 100 * nbmerge / nbrevs)) cache = unfi.stablerange allsubranges = stablerange.subrangesclosure(unfi, cache, heads) nbsubranges = len(allsubranges) - nbrevs # we remove leafs - ui.write('number of range: %12d\n' % nbsubranges) + ui.write(b'number of range: %12d\n' % nbsubranges) import collections subsizedistrib = collections.defaultdict(lambda: 0) @@ -476,7 +476,7 @@ for ss in sorted(subsizedistrib): ssc = subsizedistrib[ss] ssp = ssc * 100 // nbsubranges - ui.write(' with %3d subranges: %12d (%3d%%)\n' % (ss, ssc, ssp)) + ui.write(b' with %3d subranges: %12d (%3d%%)\n' % (ss, ssc, ssp)) depth = repo.depthcache.get stdslice = 0 @@ -491,11 +491,11 @@ else: oddslice += 1 - ui.write('standard slice point cut: %12d (%3d%%)\n' + ui.write(b'standard slice point cut: %12d (%3d%%)\n' % (stdslice, stdslice * 100 // nbsubranges)) - ui.write('other slice point cut: %12d (%3d%%)\n' + ui.write(b'other slice point cut: %12d (%3d%%)\n' % (oddslice, oddslice * 100 // nbsubranges)) - ui.write('est. naive compact store: %12d bytes\n' % totalsize) + ui.write(b'est. naive compact store: %12d bytes\n' % totalsize) @eh.reposetup def setupcache(ui, repo):