diff mercurial/localrepo.py @ 31128:95ec3ad62f62

color: initialize color for the localrepo ui The 'ui' object dedicated to a 'localrepo' is independent from the one available in dispatch (and 'uisetup'). In addition, it is created from the 'baseui' (apparently for good reason). As a result, we need to run the color setup on it after the local repository config is read. This was overlooked when the rest of the initialization changed but did not had impact yet because all setup is still global. We fix it before it is too late.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Sat, 25 Feb 2017 18:34:01 +0100
parents 59e69ed81776
children 23080c03a604
line wrap: on
line diff
--- a/mercurial/localrepo.py	Sat Feb 25 19:44:23 2017 +0100
+++ b/mercurial/localrepo.py	Sat Feb 25 18:34:01 2017 +0100
@@ -28,6 +28,7 @@
     bundle2,
     changegroup,
     changelog,
+    color,
     context,
     dirstate,
     dirstateguard,
@@ -285,6 +286,7 @@
                     setupfunc(self.ui, self.supported)
         else:
             self.supported = self._basesupported
+        color.setup(self.ui)
 
         # Add compression engines.
         for name in util.compengines: