##// END OF EJS Templates
phabricator: standardize colors...
Jun Wu -
r34065:941c33cf default
parent child Browse files
Show More
@@ -59,6 +59,15 b' from mercurial import ('
59 59 cmdtable = {}
60 60 command = registrar.command(cmdtable)
61 61
62 colortable = {
63 'phabricator.action.created': 'green',
64 'phabricator.action.skipped': 'magenta',
65 'phabricator.action.updated': 'magenta',
66 'phabricator.desc': '',
67 'phabricator.drev': 'bold',
68 'phabricator.node': '',
69 }
70
62 71 def urlencodenested(params):
63 72 """like urlencode, but works with nested parameters.
64 73
@@ -413,9 +422,9 b' def phabsend(ui, repo, *revs, **opts):'
413 422 diffmap[ctx.node()] = diff
414 423 newrevid = int(revision[r'object'][r'id'])
415 424 if revid:
416 action = _('updated')
425 action = 'updated'
417 426 else:
418 action = _('created')
427 action = 'created'
419 428
420 429 # Create a local tag to note the association, if commit message
421 430 # does not have it already
@@ -428,10 +437,18 b' def phabsend(ui, repo, *revs, **opts):'
428 437 # Nothing changed. But still set "newrevid" so the next revision
429 438 # could depend on this one.
430 439 newrevid = revid
431 action = _('skipped')
440 action = 'skipped'
432 441
433 ui.write(_('D%s: %s - %s: %s\n') % (newrevid, action, ctx,
434 ctx.description().split('\n')[0]))
442 actiondesc = ui.label(
443 {'created': _('created'),
444 'skipped': _('skipped'),
445 'updated': _('updated')}[action],
446 'phabricator.action.%s' % action)
447 drevdesc = ui.label('D%s' % newrevid, 'phabricator.drev')
448 nodedesc = ui.label(bytes(ctx), 'phabricator.node')
449 desc = ui.label(ctx.description().split('\n')[0], 'phabricator.desc')
450 ui.write(_('%s - %s - %s: %s\n') % (drevdesc, actiondesc, nodedesc,
451 desc))
435 452 drevids.append(newrevid)
436 453 lastrevid = newrevid
437 454
General Comments 0
You need to be logged in to leave comments. Login now