Patchwork D6110: py3: use %d instead of %s when formatting an int into a byte string

login
register
mail settings
Submitter phabricator
Date March 9, 2019, 3:01 a.m.
Message ID <differential-rev-PHID-DREV-fwxh4f62atkv6q4k6bv4-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/39164/
State Superseded
Headers show

Comments

phabricator - March 9, 2019, 3:01 a.m.
Kwan 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/D6110

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
@@ -428,7 +428,7 @@ 
     # existing revision (revid is not None) since that introduces visible
     # churns (someone edited "Summary" twice) on the web page.
     if parentrevid and revid is None:
-        summary = b'Depends on D%s' % parentrevid
+        summary = b'Depends on D%d' % parentrevid
         transactions += [{b'type': b'summary', b'value': summary},
                          {b'type': b'summary', b'value': b' '}]
 
@@ -568,7 +568,7 @@ 
              b'skipped': _(b'skipped'),
              b'updated': _(b'updated')}[action],
             b'phabricator.action.%s' % action)
-        drevdesc = ui.label(b'D%s' % newrevid, b'phabricator.drev')
+        drevdesc = ui.label(b'D%d' % newrevid, b'phabricator.drev')
         nodedesc = ui.label(bytes(ctx), b'phabricator.node')
         desc = ui.label(ctx.description().split(b'\n')[0], b'phabricator.desc')
         ui.write(_(b'%s - %s - %s: %s\n') % (drevdesc, actiondesc, nodedesc,