Patchwork [8,of,8] ui: fix progress debug log format strings to work on Python 3

login
register
mail settings
Submitter Augie Fackler
Date Sept. 19, 2017, 4:35 a.m.
Message ID <35f7c33d3178bd71d40b.1505795725@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/24014/
State Accepted
Headers show

Comments

Augie Fackler - Sept. 19, 2017, 4:35 a.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1505756220 14400
#      Mon Sep 18 13:37:00 2017 -0400
# Node ID 35f7c33d3178bd71d40b683c773971e44a06a9e4
# Parent  f4d1698dcee1dd87b2cb131992859980053388f9
ui: fix progress debug log format strings to work on Python 3

Patch

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -1521,10 +1521,10 @@  class ui(object):
 
         if total:
             pct = 100.0 * pos / total
-            self.debug('%s:%s %s/%s%s (%4.2f%%)\n'
+            self.debug('%s:%s %d/%d%s (%4.2f%%)\n'
                      % (topic, item, pos, total, unit, pct))
         else:
-            self.debug('%s:%s %s%s\n' % (topic, item, pos, unit))
+            self.debug('%s:%s %d%s\n' % (topic, item, pos, unit))
 
     def log(self, service, *msg, **opts):
         '''hook for logging facility extensions