bin/cubicweb-ctl.bat
author Alexandre Fayolle <alexandre.fayolle@logilab.fr>
Thu, 28 Apr 2011 17:05:22 +0200
changeset 7387 d240cff2d8ba
parent 5499 2a5cc708c2a0
permissions -rw-r--r--
[hooks selection optimization] prune hooks when multiple entities are concerned by a hm.call_hooks() (closes: #1672022) the idea is to make a first pass over all the hooks in the registry and to mark put some of them in a disabled list. The disabled hooks are the one which: * are disabled at the session level * have a match_rtype or an is_instance selector which does not match the rtype / etype of the relations / entities for which we are calling the hooks. This works because the repository calls the hooks grouped by rtype or by etype when using the entities or eids_to_from keyword arguments Only hooks with a simple selector or an AndSelector of simple selectors (is_instance and match_rtype) are considered for disabling.

@echo off
rem = """-*-Python-*- script
rem -------------------- DOS section --------------------
rem You could set PYTHONPATH or TK environment variables here
python -x "%~f0" %*
goto exit
 
"""
# -------------------- Python section --------------------
import sys
from os.path import join, dirname, normpath
sys.path.insert(0, normpath(join(dirname(__file__), '..', '..')))
from cubicweb.cwctl import run
run(sys.argv[1:])

DosExitLabel = """
:exit
rem """