Mercurial > hg
comparison hgext/phabricator.py @ 43321:a2ff3aff81d2 stable
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
author | Ian Moody <moz-ian@perix.co.uk> |
---|---|
date | Wed, 23 Oct 2019 23:00:58 +0100 |
parents | 47946f08e463 |
children | 132ddd1cba85 |
comparison
equal
deleted
inserted
replaced
43320:7b638d25b8e4 | 43321:a2ff3aff81d2 |
---|---|
1166 # associations will be lost | 1166 # associations will be lost |
1167 try: | 1167 try: |
1168 writediffproperties(unfi[newnode], diffmap[old.node()]) | 1168 writediffproperties(unfi[newnode], diffmap[old.node()]) |
1169 except util.urlerr.urlerror: | 1169 except util.urlerr.urlerror: |
1170 ui.warnnoi18n( | 1170 ui.warnnoi18n( |
1171 b'Failed to update metadata for D%s\n' % drevid | 1171 b'Failed to update metadata for D%d\n' % drevid |
1172 ) | 1172 ) |
1173 # Remove local tags since it's no longer necessary | 1173 # Remove local tags since it's no longer necessary |
1174 tagname = b'D%d' % drevid | 1174 tagname = b'D%d' % drevid |
1175 if tagname in repo.tags(): | 1175 if tagname in repo.tags(): |
1176 tags.tag( | 1176 tags.tag( |
1206 for rev in revs: | 1206 for rev in revs: |
1207 ctx = repo[rev] | 1207 ctx = repo[rev] |
1208 desc = ctx.description().splitlines()[0] | 1208 desc = ctx.description().splitlines()[0] |
1209 oldnode, olddiff, drevid = oldmap.get(ctx.node(), (None, None, None)) | 1209 oldnode, olddiff, drevid = oldmap.get(ctx.node(), (None, None, None)) |
1210 if drevid: | 1210 if drevid: |
1211 drevdesc = ui.label(b'D%s' % drevid, b'phabricator.drev') | 1211 drevdesc = ui.label(b'D%d' % drevid, b'phabricator.drev') |
1212 else: | 1212 else: |
1213 drevdesc = ui.label(_(b'NEW'), b'phabricator.drev') | 1213 drevdesc = ui.label(_(b'NEW'), b'phabricator.drev') |
1214 | 1214 |
1215 ui.write( | 1215 ui.write( |
1216 _(b'%s - %s: %s\n') | 1216 _(b'%s - %s: %s\n') |