comparison hgext/phabricator.py @ 41904:634b56b54e7c

py3: use %d instead of %s when formatting an int into a byte string Differential Revision: https://phab.mercurial-scm.org/D6110
author Ian Moody <moz-ian@perix.co.uk>
date Sat, 09 Mar 2019 01:58:51 +0000
parents 8fd19a7b4ed6
children 16d050678047
comparison
equal deleted inserted replaced
41903:8fd19a7b4ed6 41904:634b56b54e7c
428 # Use a temporary summary to set dependency. There might be better ways but 428 # Use a temporary summary to set dependency. There might be better ways but
429 # I cannot find them for now. But do not do that if we are updating an 429 # I cannot find them for now. But do not do that if we are updating an
430 # existing revision (revid is not None) since that introduces visible 430 # existing revision (revid is not None) since that introduces visible
431 # churns (someone edited "Summary" twice) on the web page. 431 # churns (someone edited "Summary" twice) on the web page.
432 if parentrevid and revid is None: 432 if parentrevid and revid is None:
433 summary = b'Depends on D%s' % parentrevid 433 summary = b'Depends on D%d' % parentrevid
434 transactions += [{b'type': b'summary', b'value': summary}, 434 transactions += [{b'type': b'summary', b'value': summary},
435 {b'type': b'summary', b'value': b' '}] 435 {b'type': b'summary', b'value': b' '}]
436 436
437 if actions: 437 if actions:
438 transactions += actions 438 transactions += actions
568 actiondesc = ui.label( 568 actiondesc = ui.label(
569 {b'created': _(b'created'), 569 {b'created': _(b'created'),
570 b'skipped': _(b'skipped'), 570 b'skipped': _(b'skipped'),
571 b'updated': _(b'updated')}[action], 571 b'updated': _(b'updated')}[action],
572 b'phabricator.action.%s' % action) 572 b'phabricator.action.%s' % action)
573 drevdesc = ui.label(b'D%s' % newrevid, b'phabricator.drev') 573 drevdesc = ui.label(b'D%d' % newrevid, b'phabricator.drev')
574 nodedesc = ui.label(bytes(ctx), b'phabricator.node') 574 nodedesc = ui.label(bytes(ctx), b'phabricator.node')
575 desc = ui.label(ctx.description().split(b'\n')[0], b'phabricator.desc') 575 desc = ui.label(ctx.description().split(b'\n')[0], b'phabricator.desc')
576 ui.write(_(b'%s - %s - %s: %s\n') % (drevdesc, actiondesc, nodedesc, 576 ui.write(_(b'%s - %s - %s: %s\n') % (drevdesc, actiondesc, nodedesc,
577 desc)) 577 desc))
578 drevids.append(newrevid) 578 drevids.append(newrevid)