mercurial/registrar.py
changeset 38690 5d9749c598f0
parent 38428 aa98392eb5b0
child 38829 7e7e2b2ff284
equal deleted inserted replaced
38689:ff5b6fca1082 38690:5d9749c598f0
   245 
   245 
   246     Optional argument 'callstatus' indicates whether a predicate
   246     Optional argument 'callstatus' indicates whether a predicate
   247      implies 'matchctx.status()' at runtime or not (False, by
   247      implies 'matchctx.status()' at runtime or not (False, by
   248      default).
   248      default).
   249 
   249 
   250     Optional argument 'callexisting' indicates whether a predicate
       
   251     implies 'matchctx.existing()' at runtime or not (False, by
       
   252     default).
       
   253 
       
   254     'filesetpredicate' instance in example above can be used to
   250     'filesetpredicate' instance in example above can be used to
   255     decorate multiple functions.
   251     decorate multiple functions.
   256 
   252 
   257     Decorated functions are registered automatically at loading
   253     Decorated functions are registered automatically at loading
   258     extension, if an instance named as 'filesetpredicate' is used for
   254     extension, if an instance named as 'filesetpredicate' is used for
   261     Otherwise, explicit 'fileset.loadpredicate()' is needed.
   257     Otherwise, explicit 'fileset.loadpredicate()' is needed.
   262     """
   258     """
   263     _getname = _funcregistrarbase._parsefuncdecl
   259     _getname = _funcregistrarbase._parsefuncdecl
   264     _docformat = "``%s``\n    %s"
   260     _docformat = "``%s``\n    %s"
   265 
   261 
   266     def _extrasetup(self, name, func, callstatus=False, callexisting=False):
   262     def _extrasetup(self, name, func, callstatus=False):
   267         func._callstatus = callstatus
   263         func._callstatus = callstatus
   268         func._callexisting = callexisting
       
   269 
   264 
   270 class _templateregistrarbase(_funcregistrarbase):
   265 class _templateregistrarbase(_funcregistrarbase):
   271     """Base of decorator to register functions as template specific one
   266     """Base of decorator to register functions as template specific one
   272     """
   267     """
   273     _docformat = ":%s: %s"
   268     _docformat = ":%s: %s"