##// 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 cmdtable = {}
59 cmdtable = {}
60 command = registrar.command(cmdtable)
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 def urlencodenested(params):
71 def urlencodenested(params):
63 """like urlencode, but works with nested parameters.
72 """like urlencode, but works with nested parameters.
64
73
@@ -413,9 +422,9 b' def phabsend(ui, repo, *revs, **opts):'
413 diffmap[ctx.node()] = diff
422 diffmap[ctx.node()] = diff
414 newrevid = int(revision[r'object'][r'id'])
423 newrevid = int(revision[r'object'][r'id'])
415 if revid:
424 if revid:
416 action = _('updated')
425 action = 'updated'
417 else:
426 else:
418 action = _('created')
427 action = 'created'
419
428
420 # Create a local tag to note the association, if commit message
429 # Create a local tag to note the association, if commit message
421 # does not have it already
430 # does not have it already
@@ -428,10 +437,18 b' def phabsend(ui, repo, *revs, **opts):'
428 # Nothing changed. But still set "newrevid" so the next revision
437 # Nothing changed. But still set "newrevid" so the next revision
429 # could depend on this one.
438 # could depend on this one.
430 newrevid = revid
439 newrevid = revid
431 action = _('skipped')
440 action = 'skipped'
432
441
433 ui.write(_('D%s: %s - %s: %s\n') % (newrevid, action, ctx,
442 actiondesc = ui.label(
434 ctx.description().split('\n')[0]))
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 drevids.append(newrevid)
452 drevids.append(newrevid)
436 lastrevid = newrevid
453 lastrevid = newrevid
437
454
General Comments 0
You need to be logged in to leave comments. Login now