color.py
31 lines
| 933 B
| text/x-python
|
PythonLexer
/ hgext / color.py
Jordi GutiƩrrez Hermoso
|
r22771 | # color.py color output for Mercurial commands | ||
Kevin Christen
|
r5787 | # | ||
# Copyright (C) 2007 Kevin Christen <kevin.christen@gmail.com> | ||||
# | ||||
Augie Fackler
|
r15771 | # This software may be used and distributed according to the terms of the | ||
# GNU General Public License version 2 or any later version. | ||||
Kevin Christen
|
r5787 | |||
Pierre-Yves David
|
r31123 | '''enable Mercurial color mode (DEPRECATED) | ||
Danek Duvall
|
r30176 | |||
Pierre-Yves David
|
r31123 | This extensions enable Mercurial color mode. The feature is now directly | ||
available in Mercurial core. You can access it using:: | ||||
Brodie Rao
|
r7456 | |||
Pierre-Yves David
|
r31123 | [ui] | ||
color = auto | ||||
Brodie Rao
|
r14769 | |||
Pierre-Yves David
|
r31123 | See :hg:`help color` for details. | ||
Kevin Christen
|
r5787 | ''' | ||
Pulkit Goyal
|
r28968 | from __future__ import absolute_import | ||
Kevin Christen
|
r5787 | |||
Pierre-Yves David
|
r31123 | from mercurial import color | ||
Kevin Christen
|
r5787 | |||
Augie Fackler
|
r29841 | # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for | ||
Augie Fackler
|
r25186 | # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should | ||
# be specifying the version(s) of Mercurial they are tested with, or | ||||
# leave the attribute unspecified. | ||||
Augie Fackler
|
r29841 | testedwith = 'ships-with-hg-core' | ||
Augie Fackler
|
r16743 | |||
Brodie Rao
|
r12693 | def extsetup(ui): | ||
Pierre-Yves David
|
r31104 | # change default color config | ||
Pierre-Yves David
|
r31110 | color._enabledbydefault = True | ||