##// END OF EJS Templates
rebase: don't update state dict same way for each root...
rebase: don't update state dict same way for each root The update statement does not depend on anything in the loop, so just move it before the loop and do it once. There are no cases where update would happen 0 times before (and 1 now); the function returns early in all such cases.

File last commit:

r31628:e86eb75e default
r32175:456b4a32 default
Show More
color.py
31 lines | 933 B | text/x-python | PythonLexer
# 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 extension enables 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