Commit 9739c778 authored by Christophe Dumez's avatar Christophe Dumez

added svn switch command

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7208 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 305928de
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.ActionInformation</string>
<string>ActionInformation</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_action</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>switch_svn_repos</string> </value>
</item>
<item>
<key> <string>optional</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>17.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Switch SVN Repository</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.CMFCore.Expression</string>
<string>Expression</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/BusinessTemplate_doSvnSwitch</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -74,6 +74,7 @@ modified = context.REQUEST["modified"]\n ...@@ -74,6 +74,7 @@ modified = context.REQUEST["modified"]\n
removed = context.REQUEST["removed"]\n removed = context.REQUEST["removed"]\n
caller = context.REQUEST["caller"]\n caller = context.REQUEST["caller"]\n
changelog = context.REQUEST["changelog"]\n changelog = context.REQUEST["changelog"]\n
repos_url = context.REQUEST["repos_url"]\n
\n \n
context.getPortalObject()["portal_subversion"].setLogin(svn_realm, svn_user, svn_password)\n context.getPortalObject()["portal_subversion"].setLogin(svn_realm, svn_user, svn_password)\n
\n \n
...@@ -87,6 +88,8 @@ elif caller == \'log\':\n ...@@ -87,6 +88,8 @@ elif caller == \'log\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnLog?file=\'+context.REQUEST[\'file\'].replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnLog?file=\'+context.REQUEST[\'file\'].replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n
elif caller == \'info\':\n elif caller == \'info\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnInfo\')\n return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnInfo\')\n
elif caller == \'switch\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnSwitch(repos_url)\')\n
else:\n else:\n
return \'Error: Caller \'+caller+\' is unknown\'\n return \'Error: Caller \'+caller+\' is unknown\'\n
</string> </value> </string> </value>
...@@ -141,6 +144,7 @@ else:\n ...@@ -141,6 +144,7 @@ else:\n
<string>removed</string> <string>removed</string>
<string>caller</string> <string>caller</string>
<string>changelog</string> <string>changelog</string>
<string>repos_url</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -71,6 +71,7 @@ modified = context.REQUEST["modified"]\n ...@@ -71,6 +71,7 @@ modified = context.REQUEST["modified"]\n
removed = context.REQUEST["removed"]\n removed = context.REQUEST["removed"]\n
caller = context.REQUEST["caller"]\n caller = context.REQUEST["caller"]\n
changelog = context.REQUEST["changelog"]\n changelog = context.REQUEST["changelog"]\n
repos_url = context.REQUEST["repos_url"]\n
\n \n
dict_keys=(\'valid_until\', \'hostname\', \'realm\', \'finger_print\', \'valid_from\', \'issuer_dname\', \'failures\',)\n dict_keys=(\'valid_until\', \'hostname\', \'realm\', \'finger_print\', \'valid_from\', \'issuer_dname\', \'failures\',)\n
trust_dict={}\n trust_dict={}\n
...@@ -89,6 +90,8 @@ elif caller == \'log\':\n ...@@ -89,6 +90,8 @@ elif caller == \'log\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnLog?file=\'+context.REQUEST[\'file\'].replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnLog?file=\'+context.REQUEST[\'file\'].replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n
elif caller == \'info\':\n elif caller == \'info\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnInfo\')\n return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnInfo\')\n
elif caller == \'switch\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_doSvnSwitch(repos_url)\')\n
else:\n else:\n
return \'Error: Caller \'+ caller + \'is unknown\'\n return \'Error: Caller \'+ caller + \'is unknown\'\n
</string> </value> </string> </value>
...@@ -140,6 +143,7 @@ else:\n ...@@ -140,6 +143,7 @@ else:\n
<string>removed</string> <string>removed</string>
<string>caller</string> <string>caller</string>
<string>changelog</string> <string>changelog</string>
<string>repos_url</string>
<string>dict_keys</string> <string>dict_keys</string>
<string>trust_dict</string> <string>trust_dict</string>
<string>_getiter_</string> <string>_getiter_</string>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">bfINCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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>from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n
\n
if "repos_url" in context.REQUEST.keys() and context.REQUEST["repos_url"].strip()!=\'\':\n
repos_url=context.REQUEST["repos_url"]\n
else:\n
repos_url=None\n
\n
if \'repos_url\' not in context.REQUEST.keys() :\n
context.REQUEST.set(\'portal_status_message\', \'Please give the repository url...\')\n
return context.BusinessTemplate_viewSvnNewRepos()\n
\n
if not repos_url :\n
context.REQUEST.set(\'portal_status_message\', "Error: Respository url can\'t be empty.")\n
return context.BusinessTemplate_viewSvnNewRepos()\n
\n
try:\n
context.getPortalObject()["portal_subversion"].switch(bt=context, url=repos_url)\n
except SubversionSSLTrustError, error:\n
context.REQUEST.set(\'portal_status_message\', \'SSL Certificate was not recognized\')\n
return context.asContext(trust_dict = error.getTrustDict(), caller=\'switch\',repos_url=repos_url).BusinessTemplate_viewSvnSSLTrust()\n
except SubversionLoginError, error1 :\n
context.REQUEST.set(\'portal_status_message\', \'Server needs authentication, no cookie found\')\n
return context.asContext(caller=\'switch\', realm = error1.getRealm(), repos_url=repos_url, username = context.getPortalObject().portal_preferences.getPreference(\'preferred_subversion_user_name\')).BusinessTemplate_viewSvnLogin()\n
\n
context.REQUEST.set(\'portal_status_message\', \'Subversion Repository switched successfully.\')\n
return context.BusinessTemplate_viewSvnStatus()\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/erp5/portal_skins/erp5_svn/BusinessTemplate_doSvnSwitch</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</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>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>kw</string>
<string>Products.ERP5Subversion.SubversionClient</string>
<string>SubversionSSLTrustError</string>
<string>SubversionLoginError</string>
<string>_getattr_</string>
<string>context</string>
<string>_getitem_</string>
<string>repos_url</string>
<string>None</string>
<string>error</string>
<string>error1</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>BusinessTemplate_doSvnSwitch</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -91,6 +91,7 @@ ...@@ -91,6 +91,7 @@
<string>my_password</string> <string>my_password</string>
<string>my_caller</string> <string>my_caller</string>
<string>my_file</string> <string>my_file</string>
<string>my_repos_url</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Form.Form</string>
<string>ERP5Form</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>BusinessTemplate_doSvnSwitch</string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>Default</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>Default</string> </key>
<value>
<list>
<string>my_repos_url</string>
</list>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BusinessTemplate_viewSvnNewRepos</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>svn_new_repo</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_dialog</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Switch</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
<string>my_issuer_name</string> <string>my_issuer_name</string>
<string>my_failures</string> <string>my_failures</string>
<string>my_file</string> <string>my_file</string>
<string>my_repos_url</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -9,6 +9,7 @@ Business Template | commit ...@@ -9,6 +9,7 @@ Business Template | commit
Business Template | svn_cleanup_locks Business Template | svn_cleanup_locks
Business Template | svn_conflicted_files Business Template | svn_conflicted_files
Business Template | svn_unversioned_files Business Template | svn_unversioned_files
Business Template | switch_svn_repos
Business Template | update_svn_wc Business Template | update_svn_wc
Business Template | view_svn_repos_infos Business Template | view_svn_repos_infos
External Folder | history External Folder | history
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment