comparison mercurial/dispatch.py @ 28447:4eb5496c2bd4

registrar: add filesetpredicate to mark a function as fileset predicate filesetpredicate is used to replace fileset.predicate in subsequent patch. This patch also adds loadpredicate() to fileset, because this combination helps to figure out how the name of "status caller" (or "existing caller") predicate is put into _statuscallers (or _existingcallers). Listing up loadpredicate() in dispatch.extraloaders causes implicit loading fileset predicate functions at loading (3rd party) extension.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 11 Mar 2016 04:14:54 +0900
parents dcb4209bd30d
children 491eabd0df79
comparison
equal deleted inserted replaced
28446:08bd09921102 28447:4eb5496c2bd4
29 demandimport, 29 demandimport,
30 encoding, 30 encoding,
31 error, 31 error,
32 extensions, 32 extensions,
33 fancyopts, 33 fancyopts,
34 fileset,
34 hg, 35 hg,
35 hook, 36 hook,
36 revset, 37 revset,
37 ui as uimod, 38 ui as uimod,
38 util, 39 util,
751 # - loadermod is the module where loader is placed 752 # - loadermod is the module where loader is placed
752 # - loadername is the name of the function, which takes (ui, extensionname, 753 # - loadername is the name of the function, which takes (ui, extensionname,
753 # extraobj) arguments 754 # extraobj) arguments
754 extraloaders = [ 755 extraloaders = [
755 ('cmdtable', commands, 'loadcmdtable'), 756 ('cmdtable', commands, 'loadcmdtable'),
757 ('filesetpredicate', fileset, 'loadpredicate'),
756 ('revsetpredicate', revset, 'loadpredicate'), 758 ('revsetpredicate', revset, 'loadpredicate'),
757 ] 759 ]
758 760
759 def _dispatch(req): 761 def _dispatch(req):
760 args = req.args 762 args = req.args