changeset 5267:fbe07b1cf5d4

py3: fix debugstablerangecache
author Joerg Sonnenberger <joerg@bec.de>
date Fri, 01 May 2020 21:05:37 +0200
parents 9035901412e6
children 277b45cf0dda
files hgext3rd/evolve/stablerangecache.py
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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):