comparison mercurial/dispatch.py @ 31105:45be7590301d

color: move triggering of the initialisation logic in core We now run the color initialisation as part of the standard dispatch. This is opening the way for multiple cleanups since we now have access to the multiple 'ui' object and we'll be able to see difference between global and local config. This cleanup will arrive in later changesets. As a side effect, the '--color' flag is now working without the extension. Since we now properly initialize color for each ui idependently, we get a warning message twice.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Tue, 21 Feb 2017 18:20:12 +0100
parents ab20491b1760
children 7fec37746417
comparison
equal deleted inserted replaced
31104:8346b2f09e79 31105:45be7590301d
762 762
763 if cmdoptions.get('insecure', False): 763 if cmdoptions.get('insecure', False):
764 for ui_ in uis: 764 for ui_ in uis:
765 ui_.insecureconnections = True 765 ui_.insecureconnections = True
766 766
767 # setup color handling
768 for ui_ in uis:
769 color.setup(ui_, options['color'])
770
767 if options['version']: 771 if options['version']:
768 return commands.version_(ui) 772 return commands.version_(ui)
769 if options['help']: 773 if options['help']:
770 return commands.help_(ui, cmd, command=cmd is not None) 774 return commands.help_(ui, cmd, command=cmd is not None)
771 elif not cmd: 775 elif not cmd: