py3: use %d instead of %s when formatting an int into a bytestring
The latter wasn't noticed before since no tests exercise --confirm at all, let
alone on an existing DREV.
The former is only hit during an intermittent network issue during amending at
the end of a phabsend, so doesn't seem testable.
Differential Revision: https://phab.mercurial-scm.org/D7153
--- a/hgext/phabricator.py Wed Oct 23 17:18:16 2019 +0200
+++ b/hgext/phabricator.py Wed Oct 23 23:00:58 2019 +0100
@@ -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')