changeset 38927:aebfc4c5c855

fileset: load core predicates directly to symbols dict We no longer have any side effect in loadpredicate().
author Yuya Nishihara <yuya@tcha.org>
date Sun, 22 Jul 2018 11:21:43 +0900
parents 41e04212261a
children 4167437a45dd
files mercurial/fileset.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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()