diff hgext/mq.py @ 36668:e77cee5de1c7

py3: use b"%d" to covert integer to bytes instead of str Differential Revision: https://phab.mercurial-scm.org/D2618
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 02 Mar 2018 07:17:06 +0530
parents bcfc4e3b6548
children f0b6fbea00cf
line wrap: on
line diff
--- a/hgext/mq.py	Fri Mar 02 07:16:33 2018 +0530
+++ b/hgext/mq.py	Fri Mar 02 07:17:06 2018 +0530
@@ -1932,7 +1932,7 @@
             length = len(self.series) - start
         if not missing:
             if self.ui.verbose:
-                idxwidth = len(str(start + length - 1))
+                idxwidth = len("%d" % (start + length - 1))
             for i in xrange(start, start + length):
                 patch = self.series[i]
                 if patch in applied:
@@ -2098,7 +2098,7 @@
         if not self.ui.verbose:
             p = pname
         else:
-            p = str(self.series.index(pname)) + " " + pname
+            p = ("%d" % self.series.index(pname)) + " " + pname
         return p
 
     def qimport(self, repo, files, patchname=None, rev=None, existing=None,