Commit 420d2ea5 authored by Christophe Dumez's avatar Christophe Dumez

- Added support for several working copies (usefull for bt in products)

- BIG code cleanup & optimisation
Note: Code has changed a lot and new bugs might have appeared although I tested a lot

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6846 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a82dff07
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>context.getPortalObject()["portal_subversion"].cleanup()\n <value> <string>context.getPortalObject()["portal_subversion"].cleanup(context)\n
\n \n
context.REQUEST.set(\'portal_status_message\', \'Subversion locks removed successfully!\')\n context.REQUEST.set(\'portal_status_message\', \'Subversion locks removed successfully!\')\n
return context.BusinessTemplate_viewSvnStatus()\n return context.BusinessTemplate_viewSvnStatus()\n
......
...@@ -88,12 +88,6 @@ if removed != \'\' and removed != \'none\':\n ...@@ -88,12 +88,6 @@ if removed != \'\' and removed != \'none\':\n
else:\n else:\n
commit_recurs = removed\n commit_recurs = removed\n
\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 \'changelog\' not in context.REQUEST.keys() :\n if \'changelog\' not in context.REQUEST.keys() :\n
context.REQUEST.set(\'portal_status_message\', \'Please set a changelog message...\')\n context.REQUEST.set(\'portal_status_message\', \'Please set a changelog message...\')\n
return context.asContext(added=added, modified=modified, removed=removed ,checked=checked).BusinessTemplate_viewSvnChangelog()\n return context.asContext(added=added, modified=modified, removed=removed ,checked=checked).BusinessTemplate_viewSvnChangelog()\n
...@@ -104,12 +98,9 @@ if not changelog :\n ...@@ -104,12 +98,9 @@ if not changelog :\n
\n \n
try:\n try:\n
if commit_non_recurs != \'none\' and commit_non_recurs != \'\':\n if commit_non_recurs != \'none\' and commit_non_recurs != \'\':\n
commit_non_recurs = [svn_path + relative_path for relative_path in commit_non_recurs]\n context.getPortalObject()["portal_subversion"].checkin(path=commit_non_recurs, bt=context, recurse=False, log_message=changelog)\n
context.getPortalObject()["portal_subversion"].checkin(path=commit_non_recurs, recurse=False, log_message=changelog)\n
if commit_recurs != \'none\' and commit_recurs != \'\':\n if commit_recurs != \'none\' and commit_recurs != \'\':\n
for relative_path in commit_recurs:\n context.getPortalObject()["portal_subversion"].checkin(path=commit_recurs, bt=context, recurse=True, log_message=changelog)\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 except SubversionSSLTrustError, error:\n
context.REQUEST.set(\'portal_status_message\', \'SSL Certificate was not recognized\')\n context.REQUEST.set(\'portal_status_message\', \'SSL Certificate was not recognized\')\n
return context.asContext(added=added, modified=modified, removed=removed, trust_dict = error.getTrustDict(), caller=\'commit\', changelog=changelog).BusinessTemplate_viewSvnSSLTrust()\n return context.asContext(added=added, modified=modified, removed=removed, trust_dict = error.getTrustDict(), caller=\'commit\', changelog=changelog).BusinessTemplate_viewSvnSSLTrust()\n
...@@ -174,11 +165,6 @@ return context.BusinessTemplate_viewSvnStatus()\n ...@@ -174,11 +165,6 @@ return context.BusinessTemplate_viewSvnStatus()\n
<string>None</string> <string>None</string>
<string>commit_non_recurs</string> <string>commit_non_recurs</string>
<string>commit_recurs</string> <string>commit_recurs</string>
<string>svn_path</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>relative_path</string>
<string>False</string> <string>False</string>
<string>True</string> <string>True</string>
<string>error</string> <string>error</string>
......
...@@ -68,12 +68,6 @@ ...@@ -68,12 +68,6 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
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
#params modified,added,removed\n #params modified,added,removed\n
modified=context.REQUEST["modified"]\n modified=context.REQUEST["modified"]\n
added=context.REQUEST["added"]\n added=context.REQUEST["added"]\n
...@@ -86,21 +80,21 @@ tab_Removed=removed.split(\',\')\n ...@@ -86,21 +80,21 @@ tab_Removed=removed.split(\',\')\n
\n \n
if modified != \'none\':\n if modified != \'none\':\n
for f in tab_Modified:\n for f in tab_Modified:\n
f = svn_path+f \n f = context.getPortalObject()["portal_subversion"].relativeToAbsolute(f, context) \n
print "<b><font color=\'black\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+f+"\'>"+f+"</a> <a href=\'"+context.getPortalObject()["portal_subversion"].editPath(context, f)+"\'><img src=\'imgs/edit.png\' border=\'0\'></a><br>"\n print "<b><font color=\'black\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+f+"\'>"+f+"</a> <a href=\'"+context.getPortalObject()["portal_subversion"].editPath(context, f)+"\'><img src=\'imgs/edit.png\' border=\'0\'></a><br>"\n
print \'<hr></font></b>\'\n print \'<hr></font></b>\'\n
print context.getPortalObject()["portal_subversion"].diffHTML(f)\n print context.getPortalObject()["portal_subversion"].diffHTML(f, context)\n
\n \n
if added != \'none\':\n if added != \'none\':\n
for f in tab_Added:\n for f in tab_Added:\n
f = svn_path+f\n f = context.getPortalObject()["portal_subversion"].relativeToAbsolute(f, context) \n
print "<b><font color=\'black\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+f+"\'>"+f+"</a> <a href=\'"+context.getPortalObject()["portal_subversion"].editPath(context, f)+"\'><img src=\'imgs/edit.png\' border=\'0\'></a><br>"\n print "<b><font color=\'black\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+f+"\'>"+f+"</a> <a href=\'"+context.getPortalObject()["portal_subversion"].editPath(context, f)+"\'><img src=\'imgs/edit.png\' border=\'0\'></a><br>"\n
print \'<hr></font></b>\'\n print \'<hr></font></b>\'\n
print "<font color=\'green\'>File Added</font><br><br>"\n print "<font color=\'green\'>File Added</font><br><br>"\n
\n \n
if removed != \'none\':\n if removed != \'none\':\n
for f in tab_Removed:\n for f in tab_Removed:\n
f = svn_path+f\n f = context.getPortalObject()["portal_subversion"].relativeToAbsolute(f, context) \n
print "<b><font color=\'black\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+f+"\'>"+f+"</a> <a href=\'"+context.getPortalObject()["portal_subversion"].editPath(context, f)+"\'><img src=\'imgs/edit.png\' border=\'0\'></a><br>"\n print "<b><font color=\'black\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+f+"\'>"+f+"</a> <a href=\'"+context.getPortalObject()["portal_subversion"].editPath(context, f)+"\'><img src=\'imgs/edit.png\' border=\'0\'></a><br>"\n
print \'<hr></font></b>\'\n print \'<hr></font></b>\'\n
print "<font color=\'red\'>File Removed</font><br><br>"\n print "<font color=\'red\'>File Removed</font><br><br>"\n
...@@ -151,10 +145,9 @@ return printed\n ...@@ -151,10 +145,9 @@ return printed\n
<tuple> <tuple>
<string>_print_</string> <string>_print_</string>
<string>_print</string> <string>_print</string>
<string>_getitem_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>svn_path</string>
<string>_getitem_</string>
<string>modified</string> <string>modified</string>
<string>added</string> <string>added</string>
<string>removed</string> <string>removed</string>
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<value> <string>from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n <value> <string>from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n
\n \n
try:\n try:\n
entry_dict = context.getPortalObject()["portal_subversion"].info()\n entry_dict = context.getPortalObject()["portal_subversion"].info(context)\n
except SubversionSSLTrustError, error:\n except SubversionSSLTrustError, error:\n
context.REQUEST.set(\'portal_status_message\', \'SSL Certificate was not recognized\')\n context.REQUEST.set(\'portal_status_message\', \'SSL Certificate was not recognized\')\n
return context.asContext(trust_dict = error.getTrustDict(), caller=\'info\').BusinessTemplate_viewSvnSSLTrust()\n return context.asContext(trust_dict = error.getTrustDict(), caller=\'info\').BusinessTemplate_viewSvnSSLTrust()\n
......
...@@ -68,12 +68,7 @@ ...@@ -68,12 +68,7 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n <value> <string>from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n
from Products.ERP5Type.Document import newTempBase\n from Products.ERP5Type.Document import newTempBase\n
svn_path = context.getPortalObject().portal_preferences.getPreference(\'subversion_working_copy\')\n working_copy = context.getPortalObject()["portal_subversion"].getSubversionPath(context)\n
if not svn_path :\n
raise "Error: Please set Subversion working path in preferences"\n
if svn_path[-1]!=\'/\':\n
svn_path+=\'/\'\n
working_copy = svn_path + context.getTitle()\n
\n \n
try:\n try:\n
unversioned_list = context.getPortalObject()["portal_subversion"].unversionedFiles(working_copy)\n unversioned_list = context.getPortalObject()["portal_subversion"].unversionedFiles(working_copy)\n
...@@ -141,9 +136,8 @@ return object_list\n ...@@ -141,9 +136,8 @@ return object_list\n
<string>Products.ERP5Type.Document</string> <string>Products.ERP5Type.Document</string>
<string>newTempBase</string> <string>newTempBase</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string>
<string>svn_path</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>context</string>
<string>working_copy</string> <string>working_copy</string>
<string>unversioned_list</string> <string>unversioned_list</string>
<string>error</string> <string>error</string>
......
...@@ -70,14 +70,9 @@ ...@@ -70,14 +70,9 @@
from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n
from Products.ERP5Type.Document import newTempBase\n from Products.ERP5Type.Document import newTempBase\n
svn_path = context.getPortalObject().portal_preferences.getPreference(\'subversion_working_copy\')\n \n
if not svn_path :\n
raise "Error: Please set Subversion working path in preferences"\n
if svn_path[-1]!=\'/\':\n
svn_path+=\'/\'\n
file = svn_path + file\n
try:\n try:\n
log_list = context.getPortalObject()["portal_subversion"].log(file)\n log_list = context.getPortalObject()["portal_subversion"].log(file, context)\n
except SubversionSSLTrustError, error:\n except SubversionSSLTrustError, error:\n
context.REQUEST.set(\'portal_status_message\', \'SSL Certificate was not recognized\')\n context.REQUEST.set(\'portal_status_message\', \'SSL Certificate was not recognized\')\n
return context.asContext(trust_dict = error.getTrustDict(), caller=\'log\').BusinessTemplate_viewSvnSSLTrust()\n return context.asContext(trust_dict = error.getTrustDict(), caller=\'log\').BusinessTemplate_viewSvnSSLTrust()\n
...@@ -147,9 +142,8 @@ return object_list\n ...@@ -147,9 +142,8 @@ return object_list\n
<string>Products.ERP5Type.Document</string> <string>Products.ERP5Type.Document</string>
<string>newTempBase</string> <string>newTempBase</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string>
<string>svn_path</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>context</string>
<string>log_list</string> <string>log_list</string>
<string>error</string> <string>error</string>
<string>error1</string> <string>error1</string>
......
...@@ -67,15 +67,9 @@ ...@@ -67,15 +67,9 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n <value> <string>from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\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
file = svn_path + file\n
\n \n
try:\n try:\n
infos_list = context.getPortalObject()["portal_subversion"].ls(file)\n infos_list = context.getPortalObject()["portal_subversion"].ls(file, context)\n
except SubversionSSLTrustError, error:\n except SubversionSSLTrustError, error:\n
context.REQUEST.set(\'portal_status_message\', \'SSL Certificate was not recognized\')\n context.REQUEST.set(\'portal_status_message\', \'SSL Certificate was not recognized\')\n
return context.asContext(trust_dict = error.getTrustDict(), caller=\'ls\').BusinessTemplate_viewSvnSSLTrust()\n return context.asContext(trust_dict = error.getTrustDict(), caller=\'ls\').BusinessTemplate_viewSvnSSLTrust()\n
...@@ -131,9 +125,8 @@ else:\n ...@@ -131,9 +125,8 @@ else:\n
<string>SubversionSSLTrustError</string> <string>SubversionSSLTrustError</string>
<string>SubversionLoginError</string> <string>SubversionLoginError</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string>
<string>svn_path</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>context</string>
<string>infos_list</string> <string>infos_list</string>
<string>error</string> <string>error</string>
<string>error1</string> <string>error1</string>
......
...@@ -82,16 +82,9 @@ if len(revisions_list) != 2:\n ...@@ -82,16 +82,9 @@ if len(revisions_list) != 2:\n
\n \n
revisions_list.sort()\n revisions_list.sort()\n
\n \n
svn_path = context.getPortalObject().portal_preferences.getPreference(\'subversion_working_copy\')\n diff = "<b><font color=\'black\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+context.getPortalObject()["portal_subversion"].relativeToAbsolute(file)+"\'>"+context.getPortalObject()["portal_subversion"].relativeToAbsolute(file)+"</a> <a href=\'"+context.getPortalObject()["portal_subversion"].editPath(context, file)+"\'><img src=\'imgs/edit.png\' border=\'0\'></a><br>"\n
if not svn_path :\n
raise "Error: Please set Subversion working path in preferences"\n
if svn_path[-1]!=\'/\':\n
svn_path += \'/\'\n
file = svn_path + file\n
\n
diff = "<b><font color=\'black\'>Index: <a href=\'BusinessTemplate_viewSvnShowFile?file="+file+"\'>"+file+"</a> <a href=\'"+context.getPortalObject()["portal_subversion"].editPath(context, file)+"\'><img src=\'imgs/edit.png\' border=\'0\'></a><br>"\n
diff += \'<hr></b>\'\n diff += \'<hr></b>\'\n
diff += context.getPortalObject()["portal_subversion"].diffHTML(file, revision1=revisions_list[0], revision2=revisions_list[1])\n diff += context.getPortalObject()["portal_subversion"].diffHTML(file, context, revision1=revisions_list[0], revision2=revisions_list[1])\n
diff += \'</font>\'\n diff += \'</font>\'\n
return context.asContext(diff=diff).BusinessTemplate_viewSvnMultiDiff()\n return context.asContext(diff=diff).BusinessTemplate_viewSvnMultiDiff()\n
...@@ -143,7 +136,6 @@ return context.asContext(diff=diff).BusinessTemplate_viewSvnMultiDiff()\n ...@@ -143,7 +136,6 @@ return context.asContext(diff=diff).BusinessTemplate_viewSvnMultiDiff()\n
<string>file</string> <string>file</string>
<string>revisions_list</string> <string>revisions_list</string>
<string>len</string> <string>len</string>
<string>svn_path</string>
<string>diff</string> <string>diff</string>
</tuple> </tuple>
</value> </value>
......
...@@ -71,15 +71,8 @@ ...@@ -71,15 +71,8 @@
else:\n else:\n
to_revert = files\n to_revert = files\n
\n \n
svn_path = context.getPortalObject().portal_preferences.getPreference(\'subversion_working_copy\')\n if to_revert != \'none\' and to_revert != \'\':\n
if not svn_path :\n context.getPortalObject()["portal_subversion"].revert(path=to_revert, bt=context)\n
raise "Error: Please set Subversion working path in preferences"\n
if svn_path[-1]!=\'/\':\n
svn_path+=\'/\'\n
\n
if to_revert != \'none\' :\n
to_revert = [svn_path + relative_path for relative_path in to_revert]\n
context.getPortalObject()["portal_subversion"].revert(path=to_revert)\n
\n \n
context.REQUEST.set(\'portal_status_message\', \'Changes reverted successfully!\')\n context.REQUEST.set(\'portal_status_message\', \'Changes reverted successfully!\')\n
return context.BusinessTemplate_viewSvnStatus()\n return context.BusinessTemplate_viewSvnStatus()\n
...@@ -126,13 +119,8 @@ return context.BusinessTemplate_viewSvnStatus()\n ...@@ -126,13 +119,8 @@ return context.BusinessTemplate_viewSvnStatus()\n
<string>files</string> <string>files</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>to_revert</string> <string>to_revert</string>
<string>context</string>
<string>svn_path</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>append</string> <string>context</string>
<string>$append0</string>
<string>_getiter_</string>
<string>relative_path</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -67,13 +67,7 @@ ...@@ -67,13 +67,7 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n <value> <string>from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n
\n svn_path = context.getPortalObject()["portal_subversion"].getSubversionPath(context)\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
svn_path += context.getTitle()\n
\n \n
try:\n try:\n
context.getPortalObject()["portal_subversion"].update(svn_path)\n context.getPortalObject()["portal_subversion"].update(svn_path)\n
...@@ -130,9 +124,9 @@ return context.BusinessTemplate_viewSvnStatus()\n ...@@ -130,9 +124,9 @@ return context.BusinessTemplate_viewSvnStatus()\n
<string>SubversionSSLTrustError</string> <string>SubversionSSLTrustError</string>
<string>SubversionLoginError</string> <string>SubversionLoginError</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>_getitem_</string>
<string>context</string> <string>context</string>
<string>svn_path</string> <string>svn_path</string>
<string>_getitem_</string>
<string>error</string> <string>error</string>
<string>error1</string> <string>error1</string>
</tuple> </tuple>
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
infos_dict context/infos_dict">\n infos_dict context/infos_dict">\n
\n \n
<font color=\'black\'>\n <font color=\'black\'>\n
<br><a tal:attributes="href python:\'BusinessTemplate_viewSvnShowFile?file=\'+str(path)"><b tal:content="path"></b></a>\n <br><a tal:attributes="href python:\'BusinessTemplate_viewSvnShowFile?file=\'+str(path)"><b tal:content="python:context.getPortalObject()[\'portal_subversion\'].relativeToAbsolute(path,context)"></b></a>\n
<a tal:attributes="href context/edit_path"><img src=\'imgs/edit.png\' border=\'0\'></a><hr><br>\n <a tal:attributes="href context/edit_path"><img src=\'imgs/edit.png\' border=\'0\'></a><hr><br>\n
<span tal:condition="infos_dict">\n <span tal:condition="infos_dict">\n
<table width=60%% border=1>\n <table width=60%% border=1>\n
......
...@@ -74,8 +74,7 @@ ...@@ -74,8 +74,7 @@
<value> <value>
<list> <list>
<string>my_preferred_subversion_user_name</string> <string>my_preferred_subversion_user_name</string>
<string>my_preferred_subversion_working_copy</string> <string>my_preferred_subversion_working_copy_list</string>
<string>my_preferred_bootstrap_working_copy</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>StringField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_preferred_bootstrap_working_copy</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Working copy Path (bootstrap)</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<tuple> <tuple>
<tuple> <tuple>
<string>Products.Formulator.StandardFields</string> <string>Products.Formulator.StandardFields</string>
<string>StringField</string> <string>LinesField</string>
</tuple> </tuple>
<none/> <none/>
</tuple> </tuple>
...@@ -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_preferred_subversion_working_copy</string> </value> <value> <string>my_preferred_subversion_working_copy_list</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -24,13 +24,21 @@ ...@@ -24,13 +24,21 @@
<key> <string>external_validator_failed</string> </key> <key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value> <value> <string>The input failed the external validator.</string> </value>
</item> </item>
<item>
<key> <string>line_too_long</string> </key>
<value> <string>A line was too long.</string> </value>
</item>
<item> <item>
<key> <string>required_not_found</string> </key> <key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value> <value> <string>Input is required but no input given.</string> </value>
</item> </item>
<item> <item>
<key> <string>too_long</string> </key> <key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value> <value> <string>You entered too many characters.</string> </value>
</item>
<item>
<key> <string>too_many_lines</string> </key>
<value> <string>You entered too many lines.</string> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
...@@ -55,14 +63,6 @@ ...@@ -55,14 +63,6 @@
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -79,6 +79,10 @@ ...@@ -79,6 +79,10 @@
<key> <string>extra</string> </key> <key> <string>extra</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -87,6 +91,14 @@ ...@@ -87,6 +91,14 @@
<key> <string>max_length</string> </key> <key> <string>max_length</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>required</string> </key> <key> <string>required</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -96,17 +108,21 @@ ...@@ -96,17 +108,21 @@
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>unicode</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>view_separator</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>whitespace_preserve</string> </key> <key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
...@@ -130,14 +146,6 @@ ...@@ -130,14 +146,6 @@
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -154,6 +162,10 @@ ...@@ -154,6 +162,10 @@
<key> <string>extra</string> </key> <key> <string>extra</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>height</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -162,6 +174,14 @@ ...@@ -162,6 +174,14 @@
<key> <string>max_length</string> </key> <key> <string>max_length</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>required</string> </key> <key> <string>required</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -171,17 +191,21 @@ ...@@ -171,17 +191,21 @@
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>unicode</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>view_separator</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>whitespace_preserve</string> </key> <key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>width</string> </key>
<value> <string></string> </value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
...@@ -205,14 +229,6 @@ ...@@ -205,14 +229,6 @@
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <int>1</int> </value> <value> <int>1</int> </value>
...@@ -229,6 +245,10 @@ ...@@ -229,6 +245,10 @@
<key> <string>extra</string> </key> <key> <string>extra</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>height</string> </key>
<value> <int>5</int> </value>
</item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
...@@ -237,26 +257,43 @@ ...@@ -237,26 +257,43 @@
<key> <string>max_length</string> </key> <key> <string>max_length</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>max_linelength</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_lines</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>required</string> </key> <key> <string>required</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Working copy Path (bt5)</string> </value> <value> <string>my_preferred_subversion_working_copy_list</string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>unicode</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>view_separator</string> </key>
<value> <int>0</int> </value> <value> <string encoding="cdata"><![CDATA[
<br />\n
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>whitespace_preserve</string> </key> <key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item>
<key> <string>width</string> </key>
<value> <int>40</int> </value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
......
...@@ -70,20 +70,14 @@ ...@@ -70,20 +70,14 @@
context.getPortalObject().portal_subversion.extractBT(context)\n context.getPortalObject().portal_subversion.extractBT(context)\n
\n \n
bt_name = context.getPortalObject()["portal_templates"][context.getId()].getTitle()\n
context.REQUEST.RESPONSE.setHeader(\'Content-Type\', \'text/xml;; charset=utf-8\')\n context.REQUEST.RESPONSE.setHeader(\'Content-Type\', \'text/xml;; charset=utf-8\')\n
path = context.getPortalObject().portal_preferences.getPreferredSubversionWorkingCopy()\n \n
if not path :\n root = context.getPortalObject().portal_subversion.getModifiedTree(context)\n
raise "Error: Please set Subversion working path in preferences"\n
if path[-1] != \'/\':\n
path += \'/\'\n
path+=bt_name\n
root = context.getPortalObject().portal_subversion.getModifiedTree(path)\n
if not root:\n if not root:\n
return \'\'\'<?xml version=\'1.0\' encoding=\'iso-8859-1\'?>\n return \'\'\'<?xml version=\'1.0\' encoding=\'iso-8859-1\'?>\n
<tree id=\'0\'></tree>\'\'\'\n <tree id=\'0\'></tree>\'\'\'\n
\n \n
return context.getPortalObject().portal_subversion.treeToXML(root).strip()\n return context.getPortalObject().portal_subversion.treeToXML(root, context).strip()\n
]]></string> </value> ]]></string> </value>
...@@ -128,9 +122,6 @@ return context.getPortalObject().portal_subversion.treeToXML(root).strip()\n ...@@ -128,9 +122,6 @@ return context.getPortalObject().portal_subversion.treeToXML(root).strip()\n
<tuple> <tuple>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>_getitem_</string>
<string>bt_name</string>
<string>path</string>
<string>root</string> <string>root</string>
</tuple> </tuple>
</value> </value>
......
2006-04-21 chris
* added subversion support for several
working copies
2006-04-10 chris 2006-04-10 chris
* added Subversion Tool integration * added Subversion Tool integration
......
0.2 0.3
\ No newline at end of file \ No newline at end of file
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