Mercurial > public > mercurial-scm > hg
comparison mercurial/dispatch.py @ 30653: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 | 2d555d753f0e |
children | caf7e1c5efe4 |
comparison
equal
deleted
inserted
replaced
30652:1ec42bdd7874 | 30653:b2be4ccaff1d |
---|---|
23 | 23 |
24 from .i18n import _ | 24 from .i18n import _ |
25 | 25 |
26 from . import ( | 26 from . import ( |
27 cmdutil, | 27 cmdutil, |
28 color, | |
28 commands, | 29 commands, |
29 debugcommands, | 30 debugcommands, |
30 demandimport, | 31 demandimport, |
31 encoding, | 32 encoding, |
32 error, | 33 error, |
633 # - loadermod is the module where loader is placed | 634 # - loadermod is the module where loader is placed |
634 # - loadername is the name of the function, which takes (ui, extensionname, | 635 # - loadername is the name of the function, which takes (ui, extensionname, |
635 # extraobj) arguments | 636 # extraobj) arguments |
636 extraloaders = [ | 637 extraloaders = [ |
637 ('cmdtable', commands, 'loadcmdtable'), | 638 ('cmdtable', commands, 'loadcmdtable'), |
639 ('colortable', color, 'loadcolortable'), | |
638 ('filesetpredicate', fileset, 'loadpredicate'), | 640 ('filesetpredicate', fileset, 'loadpredicate'), |
639 ('revsetpredicate', revset, 'loadpredicate'), | 641 ('revsetpredicate', revset, 'loadpredicate'), |
640 ('templatefilter', templatefilters, 'loadfilter'), | 642 ('templatefilter', templatefilters, 'loadfilter'), |
641 ('templatefunc', templater, 'loadfunction'), | 643 ('templatefunc', templater, 'loadfunction'), |
642 ('templatekeyword', templatekw, 'loadkeyword'), | 644 ('templatekeyword', templatekw, 'loadkeyword'), |