# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2018-04-12 09:00:37 # Node ID ce566e0f73d07ca2e5a415b98545b325ac3f2e92 # Parent 56df2ca5c03266096ee3982280b2fc6dfe235277 py3: use '%d' for integers instead of '%s' Differential Revision: https://phab.mercurial-scm.org/D3277 diff --git a/hgext/convert/git.py b/hgext/convert/git.py --- a/hgext/convert/git.py +++ b/hgext/convert/git.py @@ -435,7 +435,7 @@ class convert_git(common.converter_sourc 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] diff --git a/hgext/convert/hg.py b/hgext/convert/hg.py --- a/hgext/convert/hg.py +++ b/hgext/convert/hg.py @@ -401,7 +401,7 @@ class mercurial_sink(common.converter_si 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, diff --git a/hgext/infinitepush/__init__.py b/hgext/infinitepush/__init__.py --- a/hgext/infinitepush/__init__.py +++ b/hgext/infinitepush/__init__.py @@ -1042,7 +1042,7 @@ def storebundle(op, params, bundlefile): # 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] diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -1021,7 +1021,7 @@ def verify(repo): 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()))