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:32 p.m.
Message ID <39abbeb6e5aea0459ec3ed97258cfd7c@localhost.localdomain>
Download mbox | patch
Permalink /patch/42575/
State Not Applicable
Headers show

Comments

phabricator - Oct. 24, 2019, 4:32 p.m.
Closed by commit rHGa2ff3aff81d2: py3: use %d instead of %s when formatting an int into a bytestring (authored by Kwan).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

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

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
@@ -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')