Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG634b56b54e7c: py3: use %d instead of %s when formatting an int into a byte string
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
diff = olddiff | diff = olddiff | ||||
writediffproperties(ctx, diff) | writediffproperties(ctx, diff) | ||||
# Use a temporary summary to set dependency. There might be better ways but | # Use a temporary summary to set dependency. There might be better ways but | ||||
# I cannot find them for now. But do not do that if we are updating an | # I cannot find them for now. But do not do that if we are updating an | ||||
# existing revision (revid is not None) since that introduces visible | # existing revision (revid is not None) since that introduces visible | ||||
# churns (someone edited "Summary" twice) on the web page. | # churns (someone edited "Summary" twice) on the web page. | ||||
if parentrevid and revid is None: | if parentrevid and revid is None: | ||||
summary = b'Depends on D%s' % parentrevid | summary = b'Depends on D%d' % parentrevid | ||||
transactions += [{b'type': b'summary', b'value': summary}, | transactions += [{b'type': b'summary', b'value': summary}, | ||||
{b'type': b'summary', b'value': b' '}] | {b'type': b'summary', b'value': b' '}] | ||||
if actions: | if actions: | ||||
transactions += actions | transactions += actions | ||||
# Parse commit message and update related fields. | # Parse commit message and update related fields. | ||||
desc = ctx.description() | desc = ctx.description() | ||||
newrevid = revid | newrevid = revid | ||||
action = b'skipped' | action = b'skipped' | ||||
actiondesc = ui.label( | actiondesc = ui.label( | ||||
{b'created': _(b'created'), | {b'created': _(b'created'), | ||||
b'skipped': _(b'skipped'), | b'skipped': _(b'skipped'), | ||||
b'updated': _(b'updated')}[action], | b'updated': _(b'updated')}[action], | ||||
b'phabricator.action.%s' % action) | b'phabricator.action.%s' % action) | ||||
drevdesc = ui.label(b'D%s' % newrevid, b'phabricator.drev') | drevdesc = ui.label(b'D%d' % newrevid, b'phabricator.drev') | ||||
nodedesc = ui.label(bytes(ctx), b'phabricator.node') | nodedesc = ui.label(bytes(ctx), b'phabricator.node') | ||||
desc = ui.label(ctx.description().split(b'\n')[0], b'phabricator.desc') | desc = ui.label(ctx.description().split(b'\n')[0], b'phabricator.desc') | ||||
ui.write(_(b'%s - %s - %s: %s\n') % (drevdesc, actiondesc, nodedesc, | ui.write(_(b'%s - %s - %s: %s\n') % (drevdesc, actiondesc, nodedesc, | ||||
desc)) | desc)) | ||||
drevids.append(newrevid) | drevids.append(newrevid) | ||||
lastrevid = newrevid | lastrevid = newrevid | ||||
# Update commit messages and remove tags | # Update commit messages and remove tags |