Patchwork D7153: py3: use %d instead of %s when formatting an int into a bytestring

login
register
mail settings
Submitter phabricator
Date Oct. 24, 2019, 4:45 p.m.
Message ID <f628535c5f9f69fe6195e9ef9f90bd89@localhost.localdomain>
Download mbox | patch
Permalink /patch/42576/
State Not Applicable
Headers show

Comments

phabricator - Oct. 24, 2019, 4:45 p.m.
Kwan edited the summary of this revision.
Kwan updated this revision to Diff 17397.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7153?vs=17396&id=17397

BRANCH
  stable

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7153/new/

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

AFFECTED FILES
  hgext/phabricator.py

CHANGE DETAILS




To: Kwan, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/phabricator.py b/hgext/phabricator.py
--- a/hgext/phabricator.py
+++ b/hgext/phabricator.py
@@ -441,7 +441,7 @@ 
                 )
                 unfi.ui.warn(
                     _(
-                        b'D%s: local tag removed - does not match '
+                        b'D%d: local tag removed - does not match '
                         b'Differential history\n'
                     )
                     % drev
@@ -1168,7 +1168,7 @@ 
                         writediffproperties(unfi[newnode], diffmap[old.node()])
                     except util.urlerr.urlerror:
                         ui.warnnoi18n(
-                            b'Failed to update metadata for D%s\n' % drevid
+                            b'Failed to update metadata for D%d\n' % drevid
                         )
                 # Remove local tags since it's no longer necessary
                 tagname = b'D%d' % drevid
@@ -1208,7 +1208,7 @@ 
         desc = ctx.description().splitlines()[0]
         oldnode, olddiff, drevid = oldmap.get(ctx.node(), (None, None, None))
         if drevid:
-            drevdesc = ui.label(b'D%s' % drevid, b'phabricator.drev')
+            drevdesc = ui.label(b'D%d' % drevid, b'phabricator.drev')
         else:
             drevdesc = ui.label(_(b'NEW'), b'phabricator.drev')