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

login
register
mail settings
Submitter phabricator
Date Feb. 24, 2018, 11:19 a.m.
Message ID <differential-rev-PHID-DREV-i6emus4wufp4bw47a3rb-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28317/
State Superseded
Headers show

Comments

phabricator - Feb. 24, 2018, 11:19 a.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/debugcommands.py
  mercurial/tags.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel
phabricator - Feb. 24, 2018, 12:57 p.m.
yuja requested changes to this revision.
yuja added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> debugcommands.py:567
>          m = util.matchdate(range)
> -        ui.write(("match: %s\n") % m(d[0]))
> +        ui.write(("match: %d\n") % m(d[0]))
>  

This one is bool.

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/mercurial/tags.py b/mercurial/tags.py
--- a/mercurial/tags.py
+++ b/mercurial/tags.py
@@ -276,7 +276,7 @@ 
     count = 0
 
     def dbg(msg):
-        ui.debug("%s, line %s: %s\n" % (fn, count, msg))
+        ui.debug("%s, line %d: %s\n" % (fn, count, msg))
 
     for nline, line in enumerate(lines):
         count += 1
diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -560,11 +560,11 @@ 
         d = util.parsedate(date, util.extendeddateformats)
     else:
         d = util.parsedate(date)
-    ui.write(("internal: %s %s\n") % d)
+    ui.write(("internal: %d %d\n") % d)
     ui.write(("standard: %s\n") % util.datestr(d))
     if range:
         m = util.matchdate(range)
-        ui.write(("match: %s\n") % m(d[0]))
+        ui.write(("match: %d\n") % m(d[0]))
 
 @command('debugdeltachain',
     cmdutil.debugrevlogopts + cmdutil.formatteropts,