hgext/color.py
changeset 30986 520af4cc34de
parent 30657 b2be4ccaff1d
child 30987 20990991d384
equal deleted inserted replaced
30985:f01df5d2fe49 30986:520af4cc34de
   185 # be specifying the version(s) of Mercurial they are tested with, or
   185 # be specifying the version(s) of Mercurial they are tested with, or
   186 # leave the attribute unspecified.
   186 # leave the attribute unspecified.
   187 testedwith = 'ships-with-hg-core'
   187 testedwith = 'ships-with-hg-core'
   188 
   188 
   189 # start and stop parameters for effects
   189 # start and stop parameters for effects
   190 _effects = {'none': 0, 'black': 30, 'red': 31, 'green': 32, 'yellow': 33,
   190 _effects = {'none': 0,
   191             'blue': 34, 'magenta': 35, 'cyan': 36, 'white': 37, 'bold': 1,
   191             'black': 30,
   192             'italic': 3, 'underline': 4, 'inverse': 7, 'dim': 2,
   192             'red': 31,
   193             'black_background': 40, 'red_background': 41,
   193             'green': 32,
   194             'green_background': 42, 'yellow_background': 43,
   194             'yellow': 33,
   195             'blue_background': 44, 'purple_background': 45,
   195             'blue': 34,
   196             'cyan_background': 46, 'white_background': 47}
   196             'magenta': 35,
       
   197             'cyan': 36,
       
   198             'white': 37,
       
   199             'bold': 1,
       
   200             'italic': 3,
       
   201             'underline': 4,
       
   202             'inverse': 7,
       
   203             'dim': 2,
       
   204             'black_background': 40,
       
   205             'red_background': 41,
       
   206             'green_background': 42,
       
   207             'yellow_background': 43,
       
   208             'blue_background': 44,
       
   209             'purple_background': 45,
       
   210             'cyan_background': 46,
       
   211             'white_background': 47}
   197 
   212 
   198 def _terminfosetup(ui, mode):
   213 def _terminfosetup(ui, mode):
   199     '''Initialize terminfo data and the terminal if we're in terminfo mode.'''
   214     '''Initialize terminfo data and the terminal if we're in terminfo mode.'''
   200 
   215 
   201     # If we failed to load curses, we go ahead and return.
   216     # If we failed to load curses, we go ahead and return.