Show More
@@ -426,6 +426,16 b' def extsetup(ui):' | |||||
426 | _("when to colorize (boolean, always, auto, or never)"), |
|
426 | _("when to colorize (boolean, always, auto, or never)"), | |
427 | _('TYPE'))) |
|
427 | _('TYPE'))) | |
428 |
|
428 | |||
|
429 | def debugcolor(ui, repo, **opts): | |||
|
430 | global _styles | |||
|
431 | _styles = {} | |||
|
432 | for effect in _effects.keys(): | |||
|
433 | _styles[effect] = effect | |||
|
434 | ui.write(('colormode: %s\n') % ui._colormode) | |||
|
435 | ui.write(_('available colors:\n')) | |||
|
436 | for label, colors in _styles.items(): | |||
|
437 | ui.write(('%s\n') % colors, label=label) | |||
|
438 | ||||
429 | if os.name != 'nt': |
|
439 | if os.name != 'nt': | |
430 | w32effects = None |
|
440 | w32effects = None | |
431 | else: |
|
441 | else: | |
@@ -555,3 +565,8 b' else:' | |||||
555 | finally: |
|
565 | finally: | |
556 | # Explicitly reset original attributes |
|
566 | # Explicitly reset original attributes | |
557 | _kernel32.SetConsoleTextAttribute(stdout, origattr) |
|
567 | _kernel32.SetConsoleTextAttribute(stdout, origattr) | |
|
568 | ||||
|
569 | cmdtable = { | |||
|
570 | 'debugcolor': | |||
|
571 | (debugcolor, [], ('hg debugcolor')) | |||
|
572 | } |
General Comments 0
You need to be logged in to leave comments.
Login now