diff mercurial/color.py @ 30657:b2be4ccaff1d

color: load 'colortable' from extension using an 'extraloader' Now that we have the '_style' dictionary in core, we can use the clean and standard 'extraloader' mechanism to load extension's 'colortable'. color.loadcolortable
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 18 Nov 2016 18:18:15 +0100
parents 1ec42bdd7874
children 20990991d384
line wrap: on
line diff
--- a/mercurial/color.py	Fri Nov 18 18:09:36 2016 +0100
+++ b/mercurial/color.py	Fri Nov 18 18:18:15 2016 +0100
@@ -60,3 +60,6 @@
            'status.unknown': 'magenta bold underline',
            'tags.normal': 'green',
            'tags.local': 'black bold'}
+
+def loadcolortable(ui, extname, colortable):
+    _styles.update(colortable)