Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 31111: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 |
comparison
equal
deleted
inserted
replaced
31110:7fec37746417 | 31111:95ec3ad62f62 |
---|---|
26 bookmarks, | 26 bookmarks, |
27 branchmap, | 27 branchmap, |
28 bundle2, | 28 bundle2, |
29 changegroup, | 29 changegroup, |
30 changelog, | 30 changelog, |
31 color, | |
31 context, | 32 context, |
32 dirstate, | 33 dirstate, |
33 dirstateguard, | 34 dirstateguard, |
34 encoding, | 35 encoding, |
35 error, | 36 error, |
283 for setupfunc in self.featuresetupfuncs: | 284 for setupfunc in self.featuresetupfuncs: |
284 if setupfunc.__module__ in extmods: | 285 if setupfunc.__module__ in extmods: |
285 setupfunc(self.ui, self.supported) | 286 setupfunc(self.ui, self.supported) |
286 else: | 287 else: |
287 self.supported = self._basesupported | 288 self.supported = self._basesupported |
289 color.setup(self.ui) | |
288 | 290 |
289 # Add compression engines. | 291 # Add compression engines. |
290 for name in util.compengines: | 292 for name in util.compengines: |
291 engine = util.compengines[name] | 293 engine = util.compengines[name] |
292 if engine.revlogheader(): | 294 if engine.revlogheader(): |