Patchwork D3277: py3: use '%d' for integers instead of '%s'

login
register
mail settings
Submitter phabricator
Date April 12, 2018, 3:04 p.m.
Message ID <4abe0237cdca66b506b9e305603c16cc@localhost.localdomain>
Download mbox | patch
Permalink /patch/30790/
State Not Applicable
Headers show

Comments

phabricator - April 12, 2018, 3:04 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGce566e0f73d0: py3: use &#039;%d&#039; for integers instead of &#039;%s&#039; (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3277?vs=8044&id=8058

REVISION DETAIL
  https://phab.mercurial-scm.org/D3277

AFFECTED FILES
  hgext/convert/git.py
  hgext/convert/hg.py
  hgext/infinitepush/__init__.py
  mercurial/hg.py

CHANGE DETAILS




To: pulkit, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -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()))
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 @@ 
 
         # 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/hgext/convert/hg.py b/hgext/convert/hg.py
--- a/hgext/convert/hg.py
+++ b/hgext/convert/hg.py
@@ -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,
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 @@ 
         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]