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

login
register
mail settings
Submitter phabricator
Date Oct. 23, 2019, 10:10 p.m.
Message ID <differential-rev-PHID-DREV-qrymonpottzexwiv5pip-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42543/
State Superseded
Headers show

Comments

phabricator - Oct. 23, 2019, 10:10 p.m.
Kwan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Not noticed before since no tests exercise --confirm at all, let alone on an
  existing DREV.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

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