Commit c1703a34 authored by Christophe Dumez's avatar Christophe Dumez

- fixed limit in number of files commited

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6551 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dba9858d
<workflow_chain>
<chain>
<type>Bug</type>
<workflow>edit_workflow, bug_workflow</workflow>
</chain>
<chain>
<type>Bug Module</type>
<workflow></workflow>
</chain>
<chain>
<type>External Folder</type>
<workflow>(Default)</workflow>
</chain>
<chain>
<type>Upload Module</type>
<workflow>(Default)</workflow>
</chain>
</workflow_chain>
\ No newline at end of file
...@@ -75,7 +75,6 @@ ...@@ -75,7 +75,6 @@
<value> <value>
<list> <list>
<string>my_changelog</string> <string>my_changelog</string>
<string>my_checked</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -83,7 +82,10 @@ ...@@ -83,7 +82,10 @@
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <value>
<list> <list>
<string>my_files</string> <string>my_checked</string>
<string>my_modified</string>
<string>my_added</string>
<string>my_removed</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_files</string> </value> <value> <string>my_added</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
......
...@@ -74,8 +74,11 @@ ...@@ -74,8 +74,11 @@
<key> <string>4</string> </key> <key> <string>4</string> </key>
<value> <value>
<list> <list>
<string>my_files</string>
<string>my_changelog</string> <string>my_changelog</string>
<string>my_realm_hidden</string>
<string>my_added</string>
<string>my_modified</string>
<string>my_removed</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -86,7 +89,6 @@ ...@@ -86,7 +89,6 @@
<string>my_realm</string> <string>my_realm</string>
<string>my_user</string> <string>my_user</string>
<string>my_password</string> <string>my_password</string>
<string>my_realm_hidden</string>
<string>my_caller</string> <string>my_caller</string>
</list> </list>
</value> </value>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_files</string> </value> <value> <string>my_added</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -283,7 +283,7 @@ ...@@ -283,7 +283,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>here/files</string> </value> <value> <string>here/REQUEST/files</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -98,6 +98,9 @@ ...@@ -98,6 +98,9 @@
<string>my_finger_print_hidden</string> <string>my_finger_print_hidden</string>
<string>my_issuer_dname_hidden</string> <string>my_issuer_dname_hidden</string>
<string>my_caller</string> <string>my_caller</string>
<string>my_added</string>
<string>my_modified</string>
<string>my_removed</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -58,24 +58,31 @@ ...@@ -58,24 +58,31 @@
\n \n
<script src="js/dhtmlXCommon.js"></script>\n <script src="js/dhtmlXCommon.js"></script>\n
<script src="js/dhtmlXTree.js"></script>\t\n <script src="js/dhtmlXTree.js"></script>\t\n
<!-- Form Hidden : Selected files -->\n
<input type=\'hidden\' name=\'removed\' value=\'\'>\n
<input type=\'hidden\' name=\'added\' value=\'\'>\n
<input type=\'hidden\' name=\'modified\' value=\'\'>\n
<input type=\'hidden\' name=\'files\' value=\'\'>\n
<!-- <input type=\'hidden\' name=\'checked\' value=\'\'> -->\n
<!-- End Hidden -->\n
<div id="menudiv" style="position:absolute; display:none; top:0px; left:0px;z-index:10000;" onmouseover="javascript:overpopupmenu=true;" onmouseout="javascript:overpopupmenu=false;">\n <div id="menudiv" style="position:absolute; display:none; top:0px; left:0px;z-index:10000;" onmouseover="javascript:overpopupmenu=true;" onmouseout="javascript:overpopupmenu=false;">\n
<table width=82 cellspacing=1 cellpadding=0 bgcolor=lightgray>\n <table width=82 cellspacing=1 cellpadding=0 bgcolor=lightgray>\n
<tr><td>\n <tr><td>\n
<table width=80 cellspacing=0 cellpadding=0>\n <table width=80 cellspacing=0 cellpadding=0>\n
<tr>\n <tr>\n
<td id="item1" bgcolor="#FFFFFF" width="80" height="16" onMouseOver="this.style.backgroundColor=\'#EFEFEF\'" onMouseOut="this.style.backgroundColor=\'#FFFFFF\'" onClick=ls()><center>Infos</center></td>\n <td id="item1" bgcolor="#FFFFFF" width="80" height="16" onMouseOver="this.style.backgroundColor=\'#EFEFEF\'" onMouseOut="this.style.backgroundColor=\'#FFFFFF\'" onClick=\'ls()\'><center>Infos</center></td>\n
</tr>\n </tr>\n
<tr>\n <tr>\n
<td id="item2" bgcolor="#FFFFFF" width="80" height="16" onMouseOver="this.style.backgroundColor=\'#EFEFEF\'" onMouseOut="this.style.backgroundColor=\'#FFFFFF\'" onClick=viewDiff(1)><center>Diff</center></td>\n <td id="item2" bgcolor="#FFFFFF" width="80" height="16" onMouseOver="this.style.backgroundColor=\'#EFEFEF\'" onMouseOut="this.style.backgroundColor=\'#FFFFFF\'" onClick=\'viewDiff(1,document.main_form)\'><center>Diff</center></td>\n
</tr>\n </tr>\n
<tr>\n <tr>\n
<td id="item3" bgcolor="#FFFFFF" width="80" height="16" onMouseOver="this.style.backgroundColor=\'#EFEFEF\'" onMouseOut="this.style.backgroundColor=\'#FFFFFF\'" onClick=log()> <center>History</center></td>\n <td id="item3" bgcolor="#FFFFFF" width="80" height="16" onMouseOver="this.style.backgroundColor=\'#EFEFEF\'" onMouseOut="this.style.backgroundColor=\'#FFFFFF\'" onClick=\'log()\'> <center>History</center></td>\n
</tr>\n </tr>\n
<tr>\n <tr>\n
<td id="item4" bgcolor="#FFFFFF" width="80" height="16" onMouseOver="this.style.backgroundColor=\'#EFEFEF\'" onMouseOut="this.style.backgroundColor=\'#FFFFFF\'" onClick=commit(1)> <center>Commit</center></td>\n <td id="item4" bgcolor="#FFFFFF" width="80" height="16" onMouseOver="this.style.backgroundColor=\'#EFEFEF\'" onMouseOut="this.style.backgroundColor=\'#FFFFFF\'" onClick=\'commit(1,document.main_form)\'> <center>Commit</center></td>\n
</tr>\n </tr>\n
<tr>\n <tr>\n
<td id="item5" bgcolor="#FFFFFF" width="80" height="16" onMouseOver="this.style.backgroundColor=\'#EFEFEF\'" onMouseOut="this.style.backgroundColor=\'#FFFFFF\'" onClick=revert(1)> <center>Revert</center></td>\n <td id="item5" bgcolor="#FFFFFF" width="80" height="16" onMouseOver="this.style.backgroundColor=\'#EFEFEF\'" onMouseOut="this.style.backgroundColor=\'#FFFFFF\'" onClick=\'revert(1,document.main_form)\'> <center>Revert</center></td>\n
</tr>\n </tr>\n
</table>\n </table>\n
</td></tr>\n </td></tr>\n
...@@ -123,9 +130,9 @@ here/createJSStatus">javascript here</tal:js>\n ...@@ -123,9 +130,9 @@ here/createJSStatus">javascript here</tal:js>\n
</td>\n </td>\n
\t</tr>\n \t</tr>\n
</table>\n </table>\n
<button onclick="viewDiff()" value="diff" name="View Diff" type="button">View Diff</button>\n <button onclick="viewDiff(0,this.form)" value="diff" name="View Diff" type="button">View Diff</button>\n
<button onclick="commit()" value="commit" name="commit Changes" type="button">Commit Changes</button>\n <button onclick="commit(0,this.form)" value="commit" name="commit Changes" type="button">Commit Changes</button>\n
<button onclick="revert()" value="revert" name="revert Changes" type="button">Revert Changes</button>\n <button onclick="revert(0,this.form)" value="revert" name="revert Changes" type="button">Revert Changes</button>\n
</center>\n </center>\n
<script>\n <script>\n
if(upLevel) {\n if(upLevel) {\n
......
...@@ -125,54 +125,66 @@ print \'\'\'<script>var tree = null;\n ...@@ -125,54 +125,66 @@ print \'\'\'<script>var tree = null;\n
is_expanded=false;\n is_expanded=false;\n
}\n }\n
}\n }\n
\n
function getget(name) {\n
var q = document.location.search;\n
var i = q.indexOf(name + \'=\');\n
\n
if (i == -1) {\n
return false;\n
}\n
\n
var r = q.substr(i + name.length + 1, q.length - i - name.length - 1);\n
\n
i = r.indexOf(\'&\');\n
\n
if (i != -1) {\n
r = r.substr(0, i);\n
}\n
\n
return r.replace(/\\+/g, \' \');\n
}\n
\n
\n \n
function commit(popup){\n function commit(popup, form){\n
nbModified=0;\n
nbAdded=0;\n
nbRemoved=0;\n
FilesRemovedArray=[]\n
FilesAddedArray=[]\n
FilesModifiedArray=[]\n
if(popup == 1){\n if(popup == 1){\n
//hide popup\n //hide popup\n
document.getElementById(\'menudiv\').style.display = "none";\n document.getElementById(\'menudiv\').style.display = "none";\n
filesToCommit = tree.getSelectedItemId();\n filesCheckedArray = [tree.getSelectedItemId()];\n
partialToCommit = tree.getAllParentId(filesToCommit);\n filesCheckedArray=filesCheckedArray.concat(tree.getAllSubItems(filesCheckedArray[0]).split(\',\'));\n
sub=tree.getAllSubItems(filesToCommit);\n
if(sub!=\'\'){\n
filesToCommit = filesToCommit+\',\'+sub;\n
}\n
}else{\n }else{\n
filesToCommit=tree.getAllChecked();\n filesCheckedArray=tree.getAllChecked().split(\',\');\n
partialToCommit=tree.getAllPartiallyChecked();\n
}\n }\n
if (filesToCommit == \'\') {\n for(i=0;i<filesCheckedArray.length; ++i){\n
alert("Nothing to commit !");\n if(tree.getItemColor(filesCheckedArray[i])==\'red\'){\n
} else {\n FilesRemovedArray[nbRemoved++]=filesCheckedArray[i];\n
if(partialToCommit == \'\') {\n
to_commit=filesToCommit\n
}else{\n }else{\n
to_commit=partialToCommit+\',\'+filesToCommit\n if(tree.getItemColor(filesCheckedArray[i])==\'green\'){\n
FilesAddedArray[nbAdded++]=filesCheckedArray[i];\n
}else\n
if(tree.getItemColor(filesCheckedArray[i])==\'orange\'){\n
FilesModifiedArray[nbModified++]=filesCheckedArray[i];\n
}\n
}\n }\n
//Commit Files\n }\n
open(\'%s/svn_commit?files=\'+escape(to_commit)+\'&checked=\'+escape(tree.getAllChecked()), \'_self\');\n partialToCommit=tree.getAllPartiallyChecked();\n
if(nbModified!=0){\n
filesModified=FilesModifiedArray.join(\',\');\n
if(partialToCommit!=\'\'){\n
filesModified=filesModified+\',\'+partialToCommit\n
}\n
}else{\n
filesModified=\'none\'\n
if(partialToCommit!=\'\'){\n
filesModified=partialToCommit\n
}\n
}\n
form.modified.value=filesModified;\n
if(nbAdded!=0){\n
filesAdded=FilesAddedArray.join(\',\');\n
}else{\n
filesAdded=\'none\'\n
}\n
form.added.value=filesAdded;\n
if(nbRemoved!=0){\n
filesRemoved=FilesRemovedArray.join(\',\');\n
}else{\n
filesRemoved=\'none\'\n
}\n
form.removed.value=filesRemoved;\n
if (nbRemoved==0 && nbAdded==0 && nbModified==0) {\n
alert(\'Nothing to commit !\');\n
} else {\n
submitAction(form,\'%s/svn_commit\');\n
}\n }\n
}\n }\n
\n \n
function clickHandler(item_id){\n function clickHandler(item_id){\n
if (tree.isItemChecked(item_id) == 0) {\n if (tree.isItemChecked(item_id) == 0) {\n
tree.setCheck(item_id, 1);\n tree.setCheck(item_id, 1);\n
...@@ -181,7 +193,7 @@ function getget(name) {\n ...@@ -181,7 +193,7 @@ function getget(name) {\n
}\n }\n
}\n }\n
\n \n
function viewDiff(popup){\n function viewDiff(popup, form){\n
nbModified=0;\n nbModified=0;\n
nbAdded=0;\n nbAdded=0;\n
nbRemoved=0;\n nbRemoved=0;\n
...@@ -213,21 +225,23 @@ function getget(name) {\n ...@@ -213,21 +225,23 @@ function getget(name) {\n
}else{\n }else{\n
filesModified=\'none\'\n filesModified=\'none\'\n
}\n }\n
form.modified.value=filesModified;\n
if(nbAdded!=0){\n if(nbAdded!=0){\n
filesAdded=FilesAddedArray.join(\',\');\n filesAdded=FilesAddedArray.join(\',\');\n
}else{\n }else{\n
filesAdded=\'none\'\n filesAdded=\'none\'\n
}\n }\n
form.added.value=filesAdded;\n
if(nbRemoved!=0){\n if(nbRemoved!=0){\n
filesRemoved=FilesRemovedArray.join(\',\');\n filesRemoved=FilesRemovedArray.join(\',\');\n
}else{\n }else{\n
filesRemoved=\'none\'\n filesRemoved=\'none\'\n
}\n }\n
\n form.removed.value=filesRemoved;\n
if (nbRemoved==0 && nbAdded==0 && nbModified==0) {\n if (nbRemoved==0 && nbAdded==0 && nbModified==0) {\n
alert(\'Nothing to diff !\');\n alert(\'Nothing to diff !\');\n
} else {\n } else {\n
open(\'%s/BusinessTemplate_viewSvnDiff?modified=\'+escape(filesModified)+\'&added=\'+escape(filesAdded)+\'&removed=\'+escape(filesRemoved), \'_self\');\n submitAction(form,\'%s/BusinessTemplate_viewSvnDiff\');\n
}\n }\n
}\n }\n
\n \n
...@@ -306,7 +320,7 @@ document.onmousedown = mouseSelect;\n ...@@ -306,7 +320,7 @@ document.onmousedown = mouseSelect;\n
document.onmousemove = getMouse;\n document.onmousemove = getMouse;\n
//document.oncontextmenu = ItemSelMenu;\n //document.oncontextmenu = ItemSelMenu;\n
\n \n
function revert(popup){\n function revert(popup,form){\n
if(popup==1){\n if(popup==1){\n
//hide popup\n //hide popup\n
document.getElementById(\'menudiv\').style.display = "none";\n document.getElementById(\'menudiv\').style.display = "none";\n
...@@ -322,8 +336,10 @@ document.onmousemove = getMouse;\n ...@@ -322,8 +336,10 @@ document.onmousemove = getMouse;\n
alert("Nothing to revert !");\n alert("Nothing to revert !");\n
} else {\n } else {\n
if(confirm(\'Are you sure you want to revert changes?\')){\n if(confirm(\'Are you sure you want to revert changes?\')){\n
form.files.value=to_revert;\n
submitAction(form,\'%s/svn_revert\');\n
//Revert changes\n //Revert changes\n
open(\'%s/svn_revert?files=\'+escape(to_revert), \'_self\');\n //open(\'/svn_revert?files=\'+escape(to_revert), \'_self\');\n
}\n }\n
}\n }\n
}\n }\n
......
...@@ -66,45 +66,56 @@ ...@@ -66,45 +66,56 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string>from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n
context.log("svn_commit", "blah")\n
from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n if "changelog" in context.REQUEST.keys() and context.REQUEST["changelog"]!=\'\':\n
\n
if "changelog" in context.REQUEST.keys():\n
changelog=context.REQUEST["changelog"]\n changelog=context.REQUEST["changelog"]\n
else:\n else:\n
changelog=None\n changelog=None\n
\n \n
to_commit = files.split(\',\')\n commit_non_recurs = added\n
if commit_non_recurs != \'\' and commit_non_recurs != \'none\':\n
if modified != \'\' and modified != \'none\':\n
commit_non_recurs = commit_non_recurs+\',\'+modified \n
else:\n
if modified != \'\' and modified != \'none\':\n
commit_non_recurs = modified\n
\n
if commit_non_recurs != \'\' and commit_non_recurs!=\'none\':\n
commit_non_recurs = commit_non_recurs.split(\',\')\n
if removed != \'\' and removed != \'none\':\n
commit_recurs = removed.split(\',\')\n
else:\n
commit_recurs = removed\n
\n
svn_path = context.getPortalObject().portal_preferences.getPreference(\'subversion_working_copy\')\n svn_path = context.getPortalObject().portal_preferences.getPreference(\'subversion_working_copy\')\n
if not svn_path :\n if not svn_path :\n
raise "Error: Please set Subversion working path in preferences"\n raise "Error: Please set Subversion working path in preferences"\n
if svn_path[-1]!=\'/\':\n if svn_path[-1]!=\'/\':\n
svn_path+=\'/\'\n svn_path+=\'/\'\n
\n \n
if to_commit != \'none\' :\n if \'changelog\' not in context.REQUEST.keys() :\n
for relative_path in to_commit:\n return context.asContext(added=added, modified=modified, removed=removed ,checked=checked).BusinessTemplate_viewSvnChangelog()\n
relative_path = svn_path+relative_path\n
\n \n
try:\n try:\n
if not changelog :\n if commit_non_recurs != \'none\' and commit_non_recurs != \'\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/BusinessTemplate_viewSvnChangelog?cancel_url=\'+context.absolute_url() + \'/\' + \'BusinessTemplate_viewSvnStatus?checked=\'+checked.replace(\'%20\',\'%2520\').replace(\' \',\'%20\')+\'&files=\'+files.replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n for relative_path in commit_non_recurs:\n
if changelog == \'\':\n relative_path = svn_path+relative_path\n
context.getPortalObject()["portal_subversion"].checkin(path=to_commit, recurse=False)\n context.getPortalObject()["portal_subversion"].checkin(path=commit_non_recurs, recurse=False, log_message=changelog)\n
else:\n if commit_recurs != \'none\' and commit_recurs != \'\':\n
context.getPortalObject()["portal_subversion"].checkin(path=to_commit, recurse=False, log_message=context.REQUEST["changelog"])\n for relative_path in commit_recurs:\n
except SubversionSSLTrustError, error:\n relative_path = svn_path+relative_path\n
context.REQUEST.set(\'portal_status_message\', \'SSL Certificate was not recognized\')\n context.getPortalObject()["portal_subversion"].checkin(path=commit_recurs, recurse=True, log_message=changelog)\n
return context.asContext(trust_dict = error.getTrustDict(), caller=\'commit\', changelog=changelog).BusinessTemplate_viewSvnSSLTrust()\n except SubversionSSLTrustError, error:\n
except SubversionLoginError, error1 :\n context.REQUEST.set(\'portal_status_message\', \'SSL Certificate was not recognized\')\n
context.REQUEST.set(\'portal_status_message\', \'Server needs authentication, no cookie found\')\n return context.asContext(added=added, modified=modified, removed=removed, trust_dict = error.getTrustDict(), caller=\'commit\', changelog=changelog).BusinessTemplate_viewSvnSSLTrust()\n
return context.asContext(caller=\'commit\', realm = error1.getRealm(), changelog=changelog, username = context.getPortalObject().portal_preferences.getPreference(\'preferred_subversion_user_name\')).BusinessTemplate_viewSvnLogin()\n except SubversionLoginError, error1 :\n
context.REQUEST.set(\'portal_status_message\', \'Server needs authentication, no cookie found\')\n
return context.asContext(added=added, modified=modified, removed=removed, caller=\'commit\', realm = error1.getRealm(), changelog=changelog, username = context.getPortalObject().portal_preferences.getPreference(\'preferred_subversion_user_name\')).BusinessTemplate_viewSvnLogin()\n
\n \n
context.REQUEST.set(\'portal_status_message\', \'Files commited successfully!\')\n context.REQUEST.set(\'portal_status_message\', \'Files commited successfully!\')\n
return context.BusinessTemplate_viewSvnStatus()\n return context.BusinessTemplate_viewSvnStatus()\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
...@@ -118,7 +129,7 @@ return context.BusinessTemplate_viewSvnStatus()\n ...@@ -118,7 +129,7 @@ return context.BusinessTemplate_viewSvnStatus()\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>files, checked=\'\'</string> </value> <value> <string>added,modified,removed,checked=\'\',**kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -138,14 +149,17 @@ return context.BusinessTemplate_viewSvnStatus()\n ...@@ -138,14 +149,17 @@ return context.BusinessTemplate_viewSvnStatus()\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>2</int> </value> <value> <int>4</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>files</string> <string>added</string>
<string>modified</string>
<string>removed</string>
<string>checked</string> <string>checked</string>
<string>kw</string>
<string>Products.ERP5Subversion.SubversionClient</string> <string>Products.ERP5Subversion.SubversionClient</string>
<string>SubversionSSLTrustError</string> <string>SubversionSSLTrustError</string>
<string>SubversionLoginError</string> <string>SubversionLoginError</string>
...@@ -154,11 +168,13 @@ return context.BusinessTemplate_viewSvnStatus()\n ...@@ -154,11 +168,13 @@ return context.BusinessTemplate_viewSvnStatus()\n
<string>_getitem_</string> <string>_getitem_</string>
<string>changelog</string> <string>changelog</string>
<string>None</string> <string>None</string>
<string>to_commit</string> <string>commit_non_recurs</string>
<string>commit_recurs</string>
<string>svn_path</string> <string>svn_path</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>relative_path</string> <string>relative_path</string>
<string>False</string> <string>False</string>
<string>True</string>
<string>error</string> <string>error</string>
<string>error1</string> <string>error1</string>
</tuple> </tuple>
......
...@@ -68,7 +68,6 @@ ...@@ -68,7 +68,6 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
return context.REQUEST\n
svn_path = context.getPortalObject().portal_preferences.getPreference(\'subversion_working_copy\')\n svn_path = context.getPortalObject().portal_preferences.getPreference(\'subversion_working_copy\')\n
if not svn_path :\n if not svn_path :\n
raise "Error: Please set Subversion working path in preferences"\n raise "Error: Please set Subversion working path in preferences"\n
......
...@@ -69,7 +69,9 @@ ...@@ -69,7 +69,9 @@
<value> <string>svn_user = context.REQUEST["user"]\n <value> <string>svn_user = context.REQUEST["user"]\n
svn_password = context.REQUEST["password"]\n svn_password = context.REQUEST["password"]\n
svn_realm = context.REQUEST["realm_hidden"]\n svn_realm = context.REQUEST["realm_hidden"]\n
files = context.REQUEST["files"]\n added = context.REQUEST["added"]\n
modified = context.REQUEST["modified"]\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
\n \n
...@@ -78,7 +80,7 @@ context.getPortalObject()["portal_subversion"].setLogin(svn_realm, svn_user, svn ...@@ -78,7 +80,7 @@ context.getPortalObject()["portal_subversion"].setLogin(svn_realm, svn_user, svn
if caller == \'update\':\n if caller == \'update\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/svn_update\')\n return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/svn_update\')\n
elif caller == \'commit\':\n elif caller == \'commit\':\n
return context.asContext(changelog=changelog).svn_commit(files=files.replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n return context.asContext(changelog=changelog).svn_commit(added=added,removed=removed,modified=modified)\n
elif caller == \'ls\':\n elif caller == \'ls\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/svn_ls?file=\'+files.replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/svn_ls?file=\'+files.replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n
elif caller == \'log\':\n elif caller == \'log\':\n
...@@ -133,9 +135,12 @@ else:\n ...@@ -133,9 +135,12 @@ else:\n
<string>svn_user</string> <string>svn_user</string>
<string>svn_password</string> <string>svn_password</string>
<string>svn_realm</string> <string>svn_realm</string>
<string>files</string> <string>added</string>
<string>modified</string>
<string>removed</string>
<string>caller</string> <string>caller</string>
<string>changelog</string> <string>changelog</string>
<string>files</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -66,7 +66,9 @@ ...@@ -66,7 +66,9 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>files = context.REQUEST["files"]\n <value> <string>added = context.REQUEST["added"]\n
modified = context.REQUEST["modified"]\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
\n \n
...@@ -80,7 +82,7 @@ context.getPortalObject()["portal_subversion"].acceptSSLServer(trust_dict, True) ...@@ -80,7 +82,7 @@ context.getPortalObject()["portal_subversion"].acceptSSLServer(trust_dict, True)
if caller == \'update\':\n if caller == \'update\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/svn_update\')\n return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/svn_update\')\n
elif caller == \'commit\':\n elif caller == \'commit\':\n
return context.asContext(changelog=changelog).svn_commit(files=files.replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n return context.asContext(changelog=changelog).svn_commit(added=added,removed=removed,modified=modified)\n
elif caller == \'ls\':\n elif caller == \'ls\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/svn_ls?file=\'+files.replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/svn_ls?file=\'+files.replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n
elif caller == \'log\':\n elif caller == \'log\':\n
...@@ -132,7 +134,9 @@ else:\n ...@@ -132,7 +134,9 @@ else:\n
<string>_getitem_</string> <string>_getitem_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>files</string> <string>added</string>
<string>modified</string>
<string>removed</string>
<string>caller</string> <string>caller</string>
<string>changelog</string> <string>changelog</string>
<string>dict_keys</string> <string>dict_keys</string>
...@@ -141,6 +145,7 @@ else:\n ...@@ -141,6 +145,7 @@ else:\n
<string>key</string> <string>key</string>
<string>_write_</string> <string>_write_</string>
<string>True</string> <string>True</string>
<string>files</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
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