diff 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
line wrap: on
line diff
--- a/mercurial/dispatch.py	Fri Mar 11 04:14:54 2016 +0900
+++ b/mercurial/dispatch.py	Fri Mar 11 04:14:54 2016 +0900
@@ -31,6 +31,7 @@
     error,
     extensions,
     fancyopts,
+    fileset,
     hg,
     hook,
     revset,
@@ -753,6 +754,7 @@
 #   extraobj) arguments
 extraloaders = [
     ('cmdtable', commands, 'loadcmdtable'),
+    ('filesetpredicate', fileset, 'loadpredicate'),
     ('revsetpredicate', revset, 'loadpredicate'),
 ]