fileset: load core predicates directly to symbols dict
authorYuya Nishihara <yuya@tcha.org>
Sun, 22 Jul 2018 11:21:43 +0900
changeset 38927 aebfc4c5c855
parent 38926 41e04212261a
child 38928 4167437a45dd
fileset: load core predicates directly to symbols dict We no longer have any side effect in loadpredicate().
mercurial/fileset.py
--- a/mercurial/fileset.py	Sun Jul 22 11:49:12 2018 +0900
+++ b/mercurial/fileset.py	Sun Jul 22 11:21:43 2018 +0900
@@ -99,7 +99,7 @@
 #  x - argument in tree form
 symbols = filesetlang.symbols
 
-predicate = registrar.filesetpredicate()
+predicate = registrar.filesetpredicate(symbols)
 
 @predicate('modified()', callstatus=True, weight=_WEIGHT_STATUS)
 def modified(mctx, x):
@@ -558,8 +558,5 @@
     for name, func in registrarobj._table.iteritems():
         symbols[name] = func
 
-# load built-in predicates explicitly
-loadpredicate(None, None, predicate)
-
 # tell hggettext to extract docstrings from these functions:
 i18nfunctions = symbols.values()