D6112: py3: use % instead of .format() on a bytestring

Kwan (Ian Moody) phabricator at mercurial-scm.org
Fri Mar 8 22:01:51 EST 2019


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/D6112

AFFECTED FILES
  hgext/phabricator.py

CHANGE DETAILS

diff --git a/hgext/phabricator.py b/hgext/phabricator.py
--- a/hgext/phabricator.py
+++ b/hgext/phabricator.py
@@ -1002,7 +1002,7 @@
     if m:
         return templateutil.hybriddict({
             b'url': m.group(r'url'),
-            b'id': b"D{}".format(m.group(r'id')),
+            b'id': b"D%s" % m.group(r'id'),
         })
     else:
         tags = ctx.repo().nodetags(ctx.node())



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


More information about the Mercurial-devel mailing list