view hgext/color.py @ 31588:2e254165a37c

similar: do not look up and create filectx more than once Benchmark with 50k added/removed files, on tmpfs: $ hg addremove --dry-run --time -q previous: real 16.070 secs (user 14.470+0.000 sys 1.580+0.000) this patch: real 12.420 secs (user 11.120+0.000 sys 1.280+0.000)
author Yuya Nishihara <yuya@tcha.org>
date Thu, 23 Mar 2017 21:17:08 +0900
parents df0a0734304a
children e86eb75e74ce
line wrap: on
line source

# color.py color output for Mercurial commands
#
# Copyright (C) 2007 Kevin Christen <kevin.christen@gmail.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.

'''enable Mercurial color mode (DEPRECATED)

This extensions enable Mercurial color mode. The feature is now directly
available in Mercurial core. You can access it using::

  [ui]
  color = auto

See :hg:`help color` for details.
'''

from __future__ import absolute_import

from mercurial import color

# Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
# 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.
testedwith = 'ships-with-hg-core'

def extsetup(ui):
    # change default color config
    color._enabledbydefault = True