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 @@
<value>
<list>
<string>my_changelog</string>
<string>my_checked</string>
</list>
</value>
</item>
......@@ -83,7 +82,10 @@
<key> <string>hidden</string> </key>
<value>
<list>
<string>my_files</string>
<string>my_checked</string>
<string>my_modified</string>
<string>my_added</string>
<string>my_removed</string>
</list>
</value>
</item>
......
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_files</string> </value>
<value> <string>my_added</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -74,8 +74,11 @@
<key> <string>4</string> </key>
<value>
<list>
<string>my_files</string>
<string>my_changelog</string>
<string>my_realm_hidden</string>
<string>my_added</string>
<string>my_modified</string>
<string>my_removed</string>
</list>
</value>
</item>
......@@ -86,7 +89,6 @@
<string>my_realm</string>
<string>my_user</string>
<string>my_password</string>
<string>my_realm_hidden</string>
<string>my_caller</string>
</list>
</value>
......
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_files</string> </value>
<value> <string>my_added</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -283,7 +283,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>here/files</string> </value>
<value> <string>here/REQUEST/files</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -98,6 +98,9 @@
<string>my_finger_print_hidden</string>
<string>my_issuer_dname_hidden</string>
<string>my_caller</string>
<string>my_added</string>
<string>my_modified</string>
<string>my_removed</string>
</list>
</value>
</item>
......
......@@ -58,24 +58,31 @@
\n
<script src="js/dhtmlXCommon.js"></script>\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
<table width=82 cellspacing=1 cellpadding=0 bgcolor=lightgray>\n
<tr><td>\n
<table width=80 cellspacing=0 cellpadding=0>\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
<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
<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
<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
<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
</table>\n
</td></tr>\n
......@@ -123,9 +130,9 @@ here/createJSStatus">javascript here</tal:js>\n
</td>\n
\t</tr>\n
</table>\n
<button onclick="viewDiff()" 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="revert()" value="revert" name="revert Changes" type="button">Revert Changes</button>\n
<button onclick="viewDiff(0,this.form)" value="diff" name="View Diff" type="button">View Diff</button>\n
<button onclick="commit(0,this.form)" value="commit" name="commit Changes" type="button">Commit Changes</button>\n
<button onclick="revert(0,this.form)" value="revert" name="revert Changes" type="button">Revert Changes</button>\n
</center>\n
<script>\n
if(upLevel) {\n
......
......@@ -125,54 +125,66 @@ print \'\'\'<script>var tree = null;\n
is_expanded=false;\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
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
//hide popup\n
document.getElementById(\'menudiv\').style.display = "none";\n
filesToCommit = tree.getSelectedItemId();\n
partialToCommit = tree.getAllParentId(filesToCommit);\n
sub=tree.getAllSubItems(filesToCommit);\n
if(sub!=\'\'){\n
filesToCommit = filesToCommit+\',\'+sub;\n
filesCheckedArray = [tree.getSelectedItemId()];\n
filesCheckedArray=filesCheckedArray.concat(tree.getAllSubItems(filesCheckedArray[0]).split(\',\'));\n
}else{\n
filesCheckedArray=tree.getAllChecked().split(\',\');\n
}\n
for(i=0;i<filesCheckedArray.length; ++i){\n
if(tree.getItemColor(filesCheckedArray[i])==\'red\'){\n
FilesRemovedArray[nbRemoved++]=filesCheckedArray[i];\n
}else{\n
filesToCommit=tree.getAllChecked();\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
partialToCommit=tree.getAllPartiallyChecked();\n
if(nbModified!=0){\n
filesModified=FilesModifiedArray.join(\',\');\n
if(partialToCommit!=\'\'){\n
filesModified=filesModified+\',\'+partialToCommit\n
}\n
if (filesToCommit == \'\') {\n
alert("Nothing to commit !");\n
} else {\n
if(partialToCommit == \'\') {\n
to_commit=filesToCommit\n
}else{\n
to_commit=partialToCommit+\',\'+filesToCommit\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
//Commit Files\n
open(\'%s/svn_commit?files=\'+escape(to_commit)+\'&checked=\'+escape(tree.getAllChecked()), \'_self\');\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
function clickHandler(item_id){\n
if (tree.isItemChecked(item_id) == 0) {\n
tree.setCheck(item_id, 1);\n
......@@ -181,7 +193,7 @@ function getget(name) {\n
}\n
}\n
\n
function viewDiff(popup){\n
function viewDiff(popup, form){\n
nbModified=0;\n
nbAdded=0;\n
nbRemoved=0;\n
......@@ -213,21 +225,23 @@ function getget(name) {\n
}else{\n
filesModified=\'none\'\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
\n
form.removed.value=filesRemoved;\n
if (nbRemoved==0 && nbAdded==0 && nbModified==0) {\n
alert(\'Nothing to diff !\');\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
......@@ -306,7 +320,7 @@ document.onmousedown = mouseSelect;\n
document.onmousemove = getMouse;\n
//document.oncontextmenu = ItemSelMenu;\n
\n
function revert(popup){\n
function revert(popup,form){\n
if(popup==1){\n
//hide popup\n
document.getElementById(\'menudiv\').style.display = "none";\n
......@@ -322,8 +336,10 @@ document.onmousemove = getMouse;\n
alert("Nothing to revert !");\n
} else {\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
open(\'%s/svn_revert?files=\'+escape(to_revert), \'_self\');\n
//open(\'/svn_revert?files=\'+escape(to_revert), \'_self\');\n
}\n
}\n
}\n
......
......@@ -66,45 +66,56 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n
\n
if "changelog" in context.REQUEST.keys():\n
<value> <string>from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n
context.log("svn_commit", "blah")\n
if "changelog" in context.REQUEST.keys() and context.REQUEST["changelog"]!=\'\':\n
changelog=context.REQUEST["changelog"]\n
else:\n
changelog=None\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
if not svn_path :\n
raise "Error: Please set Subversion working path in preferences"\n
if svn_path[-1]!=\'/\':\n
svn_path+=\'/\'\n
\n
if to_commit != \'none\' :\n
for relative_path in to_commit:\n
relative_path = svn_path+relative_path\n
if \'changelog\' not in context.REQUEST.keys() :\n
return context.asContext(added=added, modified=modified, removed=removed ,checked=checked).BusinessTemplate_viewSvnChangelog()\n
\n
try:\n
if not changelog :\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
if changelog == \'\':\n
context.getPortalObject()["portal_subversion"].checkin(path=to_commit, recurse=False)\n
else:\n
context.getPortalObject()["portal_subversion"].checkin(path=to_commit, recurse=False, log_message=context.REQUEST["changelog"])\n
except SubversionSSLTrustError, error:\n
try:\n
if commit_non_recurs != \'none\' and commit_non_recurs != \'\':\n
for relative_path in commit_non_recurs:\n
relative_path = svn_path+relative_path\n
context.getPortalObject()["portal_subversion"].checkin(path=commit_non_recurs, recurse=False, log_message=changelog)\n
if commit_recurs != \'none\' and commit_recurs != \'\':\n
for relative_path in commit_recurs:\n
relative_path = svn_path+relative_path\n
context.getPortalObject()["portal_subversion"].checkin(path=commit_recurs, recurse=True, log_message=changelog)\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=\'commit\', changelog=changelog).BusinessTemplate_viewSvnSSLTrust()\n
except SubversionLoginError, error1 :\n
return context.asContext(added=added, modified=modified, removed=removed, trust_dict = error.getTrustDict(), caller=\'commit\', changelog=changelog).BusinessTemplate_viewSvnSSLTrust()\n
except SubversionLoginError, error1 :\n
context.REQUEST.set(\'portal_status_message\', \'Server needs authentication, no cookie found\')\n
return context.asContext(caller=\'commit\', realm = error1.getRealm(), changelog=changelog, username = context.getPortalObject().portal_preferences.getPreference(\'preferred_subversion_user_name\')).BusinessTemplate_viewSvnLogin()\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
context.REQUEST.set(\'portal_status_message\', \'Files commited successfully!\')\n
return context.BusinessTemplate_viewSvnStatus()\n
]]></string> </value>
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
......@@ -118,7 +129,7 @@ return context.BusinessTemplate_viewSvnStatus()\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>files, checked=\'\'</string> </value>
<value> <string>added,modified,removed,checked=\'\',**kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -138,14 +149,17 @@ return context.BusinessTemplate_viewSvnStatus()\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>files</string>
<string>added</string>
<string>modified</string>
<string>removed</string>
<string>checked</string>
<string>kw</string>
<string>Products.ERP5Subversion.SubversionClient</string>
<string>SubversionSSLTrustError</string>
<string>SubversionLoginError</string>
......@@ -154,11 +168,13 @@ return context.BusinessTemplate_viewSvnStatus()\n
<string>_getitem_</string>
<string>changelog</string>
<string>None</string>
<string>to_commit</string>
<string>commit_non_recurs</string>
<string>commit_recurs</string>
<string>svn_path</string>
<string>_getiter_</string>
<string>relative_path</string>
<string>False</string>
<string>True</string>
<string>error</string>
<string>error1</string>
</tuple>
......
......@@ -68,7 +68,6 @@
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
return context.REQUEST\n
svn_path = context.getPortalObject().portal_preferences.getPreference(\'subversion_working_copy\')\n
if not svn_path :\n
raise "Error: Please set Subversion working path in preferences"\n
......
......@@ -69,7 +69,9 @@
<value> <string>svn_user = context.REQUEST["user"]\n
svn_password = context.REQUEST["password"]\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
changelog = context.REQUEST["changelog"]\n
\n
......@@ -78,7 +80,7 @@ context.getPortalObject()["portal_subversion"].setLogin(svn_realm, svn_user, svn
if caller == \'update\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/svn_update\')\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
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/svn_ls?file=\'+files.replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n
elif caller == \'log\':\n
......@@ -133,9 +135,12 @@ else:\n
<string>svn_user</string>
<string>svn_password</string>
<string>svn_realm</string>
<string>files</string>
<string>added</string>
<string>modified</string>
<string>removed</string>
<string>caller</string>
<string>changelog</string>
<string>files</string>
</tuple>
</value>
</item>
......
......@@ -66,7 +66,9 @@
</item>
<item>
<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
changelog = context.REQUEST["changelog"]\n
\n
......@@ -80,7 +82,7 @@ context.getPortalObject()["portal_subversion"].acceptSSLServer(trust_dict, True)
if caller == \'update\':\n
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/svn_update\')\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
return context.REQUEST.RESPONSE.redirect(context.absolute_url() + \'/svn_ls?file=\'+files.replace(\'%20\',\'%2520\').replace(\' \',\'%20\'))\n
elif caller == \'log\':\n
......@@ -132,7 +134,9 @@ else:\n
<string>_getitem_</string>
<string>_getattr_</string>
<string>context</string>
<string>files</string>
<string>added</string>
<string>modified</string>
<string>removed</string>
<string>caller</string>
<string>changelog</string>
<string>dict_keys</string>
......@@ -141,6 +145,7 @@ else:\n
<string>key</string>
<string>_write_</string>
<string>True</string>
<string>files</string>
</tuple>
</value>
</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