py3: use '%d' for integers instead of '%s'
authorPulkit Goyal <7895pulkit@gmail.com>
Thu, 12 Apr 2018 14:30:37 +0530
changeset 37579 ce566e0f73d0
parent 37578 56df2ca5c032
child 37580 1c3c9211a40e
py3: use '%d' for integers instead of '%s' Differential Revision: https://phab.mercurial-scm.org/D3277
hgext/convert/git.py
hgext/convert/hg.py
hgext/infinitepush/__init__.py
mercurial/hg.py
--- a/hgext/convert/git.py	Thu Apr 12 14:28:08 2018 +0530
+++ b/hgext/convert/git.py	Thu Apr 12 14:30:37 2018 +0530
@@ -435,7 +435,7 @@
         else:
             output, status = self.gitrunlines('diff-tree', '--name-only',
                                               '--root', '-r', version,
-                                              '%s^%s' % (version, i + 1), '--')
+                                              '%s^%d' % (version, i + 1), '--')
             if status:
                 raise error.Abort(_('cannot read changes in %s') % version)
             changes = [f.rstrip('\n') for f in output]
--- a/hgext/convert/hg.py	Thu Apr 12 14:28:08 2018 +0530
+++ b/hgext/convert/hg.py	Thu Apr 12 14:30:37 2018 +0530
@@ -401,7 +401,7 @@
             return context.memfilectx(repo, memctx, f, data, False, False, None)
 
         self.ui.status(_("updating tags\n"))
-        date = "%s 0" % int(time.mktime(time.gmtime()))
+        date = "%d 0" % int(time.mktime(time.gmtime()))
         extra = {'branch': self.tagsbranch}
         ctx = context.memctx(self.repo, (tagparent, None), "update tags",
                              [".hgtags"], getfilectx, "convert-repo", date,
--- a/hgext/infinitepush/__init__.py	Thu Apr 12 14:28:08 2018 +0530
+++ b/hgext/infinitepush/__init__.py	Thu Apr 12 14:30:37 2018 +0530
@@ -1042,7 +1042,7 @@
 
         # Notify the user of what is being pushed
         plural = 's' if len(revs) > 1 else ''
-        op.repo.ui.warn(_("pushing %s commit%s:\n") % (len(revs), plural))
+        op.repo.ui.warn(_("pushing %d commit%s:\n") % (len(revs), plural))
         maxoutput = 10
         for i in range(0, min(len(revs), maxoutput)):
             firstline = bundle[revs[i]].description().split('\n')[0][:50]
--- a/mercurial/hg.py	Thu Apr 12 14:28:08 2018 +0530
+++ b/mercurial/hg.py	Thu Apr 12 14:30:37 2018 +0530
@@ -1021,7 +1021,7 @@
                         ret = (ctx.sub(subpath, allowcreate=False).verify()
                                or ret)
                     except error.RepoError as e:
-                        repo.ui.warn(('%s: %s\n') % (rev, e))
+                        repo.ui.warn(('%d: %s\n') % (rev, e))
             except Exception:
                 repo.ui.warn(_('.hgsubstate is corrupt in revision %s\n') %
                              node.short(ctx.node()))