##// END OF EJS Templates
color: restore _style global after debugcolor ran...
Pierre-Yves David -
r30283:e1f6898a default
parent child Browse files
Show More
@@ -540,6 +540,8 b' def extsetup(ui):'
540 def debugcolor(ui, repo, **opts):
540 def debugcolor(ui, repo, **opts):
541 """show available colors and effects"""
541 """show available colors and effects"""
542 global _styles
542 global _styles
543 oldstyle = _styles
544 try:
543 _styles = {}
545 _styles = {}
544 for effect in _effects.keys():
546 for effect in _effects.keys():
545 _styles[effect] = effect
547 _styles[effect] = effect
@@ -553,6 +555,8 b' def debugcolor(ui, repo, **opts):'
553 ui.write(_('available colors:\n'))
555 ui.write(_('available colors:\n'))
554 for colorname, label in _styles.items():
556 for colorname, label in _styles.items():
555 ui.write(('%s\n') % colorname, label=label)
557 ui.write(('%s\n') % colorname, label=label)
558 finally:
559 _styles = oldstyle
556
560
557 if os.name != 'nt':
561 if os.name != 'nt':
558 w32effects = None
562 w32effects = None
General Comments 0
You need to be logged in to leave comments. Login now