From 001707c815ba67c728b6faff4513a01bdf628674 Mon Sep 17 00:00:00 2001 From: Yoshinori Okuji <yo@nexedi.com> Date: Sun, 8 Aug 2010 05:50:19 +0000 Subject: [PATCH] 2010-08-08 yo * Add helper scripts to deal with divergence in a legacy way. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37633 20353a03-c40f-0410-a6d1-a30d3c3de9de --- ...lePackingList_acceptDecisionForTesting.xml | 133 +++++++++++++++++ ...lePackingList_adoptPrevisionForTesting.xml | 135 ++++++++++++++++++ .../bt/change_log | 3 + .../bt/revision | 2 +- 4 files changed, 272 insertions(+), 1 deletion(-) create mode 100644 bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/SalePackingList_acceptDecisionForTesting.xml create mode 100644 bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/SalePackingList_adoptPrevisionForTesting.xml diff --git a/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/SalePackingList_acceptDecisionForTesting.xml b/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/SalePackingList_acceptDecisionForTesting.xml new file mode 100644 index 0000000000..f01b8a2c6b --- /dev/null +++ b/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/SalePackingList_acceptDecisionForTesting.xml @@ -0,0 +1,133 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string>divergence_list = []\n +for divergence_message in context.getDivergenceList():\n + if divergence_message.getProperty(\'tested_property\') == solver_target:\n + divergence_list.append(divergence_message)\n +simulation_tool = context.getPortalObject().portal_simulation\n +simulation_tool.solveDelivery(context, None, \'Copy\', divergence_list=divergence_list)\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>solver_target</string> </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>solver_target</string> + <string>divergence_list</string> + <string>_getiter_</string> + <string>_getattr_</string> + <string>context</string> + <string>divergence_message</string> + <string>simulation_tool</string> + <string>None</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>SalePackingList_acceptDecisionForTesting</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/SalePackingList_adoptPrevisionForTesting.xml b/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/SalePackingList_adoptPrevisionForTesting.xml new file mode 100644 index 0000000000..402c86c1ae --- /dev/null +++ b/bt5/erp5_simulation_performance_test/SkinTemplateItem/portal_skins/erp5_simulation_performance_test/SalePackingList_adoptPrevisionForTesting.xml @@ -0,0 +1,135 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string>delivery_tool = context.getPortalObject().portal_deliveries\n +delivery_builder = delivery_tool.test_sale_packing_list_builder\n +divergence_list = []\n +for divergence_message in context.getDivergenceList():\n + if divergence_message.getProperty(\'tested_property\') == solver_target:\n + divergence_list.append(divergence_message)\n +delivery_builder.solveDivergence(context.getRelativeUrl(),\n + divergence_to_adopt_list=divergence_list)\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>solver_target</string> </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>solver_target</string> + <string>_getattr_</string> + <string>context</string> + <string>delivery_tool</string> + <string>delivery_builder</string> + <string>divergence_list</string> + <string>_getiter_</string> + <string>divergence_message</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>SalePackingList_adoptPrevisionForTesting</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_simulation_performance_test/bt/change_log b/bt5/erp5_simulation_performance_test/bt/change_log index 49049a702c..ecfc5874b3 100644 --- a/bt5/erp5_simulation_performance_test/bt/change_log +++ b/bt5/erp5_simulation_performance_test/bt/change_log @@ -1,3 +1,6 @@ +2010-08-08 yo +* Add helper scripts to deal with divergence in a legacy way. + 2010-08-07 yo * Split the category movement group into an updatable one and a non-updatable one, to have some categories to be changeable without making another delivery. diff --git a/bt5/erp5_simulation_performance_test/bt/revision b/bt5/erp5_simulation_performance_test/bt/revision index bf0d87ab1b..7813681f5b 100644 --- a/bt5/erp5_simulation_performance_test/bt/revision +++ b/bt5/erp5_simulation_performance_test/bt/revision @@ -1 +1 @@ -4 \ No newline at end of file +5 \ No newline at end of file -- 2.30.9