[Erp5-report] r6545 - /erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Apr 11 11:33:24 CEST 2006


Author: chris
Date: Tue Apr 11 11:33:23 2006
New Revision: 6545

URL: http://svn.erp5.org?rev=6545&view=rev
Log:
subversion improved a little

Modified:
    erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_commit.xml
    erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_diff.xml
    erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_log.xml
    erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_ls.xml
    erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_revert.xml

Modified: erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_commit.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_commit.xml?rev=6545&r1=6544&r2=6545&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_commit.xml (original)
+++ erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_commit.xml Tue Apr 11 11:33:23 2006
@@ -70,15 +70,22 @@
 
 from Products.ERP5Subversion.SubversionClient import SubversionSSLTrustError, SubversionLoginError\n
 \n
-#return context.REQUEST\n
 if "changelog" in context.REQUEST.keys():\n
   changelog=context.REQUEST["changelog"]\n
 else:\n
   changelog=None\n
 \n
 to_commit = files.split(\',\')\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
+\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
@@ -148,6 +155,9 @@
                             <string>changelog</string>
                             <string>None</string>
                             <string>to_commit</string>
+                            <string>svn_path</string>
+                            <string>_getiter_</string>
+                            <string>relative_path</string>
                             <string>False</string>
                             <string>error</string>
                             <string>error1</string>

Modified: erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_diff.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_diff.xml?rev=6545&r1=6544&r2=6545&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_diff.xml (original)
+++ erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_diff.xml Tue Apr 11 11:33:23 2006
@@ -68,6 +68,13 @@
             <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
+if svn_path[-1]!=\'/\':\n
+  svn_path+=\'/\'\n
+\n
 #params modified,added,removed\n
 modified=context.REQUEST["modified"]\n
 added=context.REQUEST["added"]\n
@@ -80,18 +87,21 @@
 \n
 if modified != \'none\':\n
   for f in tab_Modified:\n
+    f = svn_path+f    \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 context.getPortalObject()["portal_subversion"].diffHTML(f)\n
 \n
 if added != \'none\':\n
   for f in tab_Added:\n
+    f = svn_path+f\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 "<font color=\'green\'>File Added</font><br><br>"\n
 \n
 if removed != \'none\':\n
   for f in tab_Removed:\n
+    f = svn_path+f\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 "<font color=\'red\'>File Removed</font><br><br>"\n
@@ -143,9 +153,10 @@
                           <tuple>
                             <string>_print_</string>
                             <string>_print</string>
-                            <string>_getitem_</string>
                             <string>_getattr_</string>
                             <string>context</string>
+                            <string>svn_path</string>
+                            <string>_getitem_</string>
                             <string>modified</string>
                             <string>added</string>
                             <string>removed</string>

Modified: erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_log.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_log.xml?rev=6545&r1=6544&r2=6545&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_log.xml (original)
+++ erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_log.xml Tue Apr 11 11:33:23 2006
@@ -67,6 +67,13 @@
         <item>
             <key> <string>_body</string> </key>
             <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
+\n
+file = svn_path + file\n
 \n
 try:\n
   log_list = context.getPortalObject()["portal_subversion"].log(file)\n
@@ -123,8 +130,9 @@
                             <string>SubversionSSLTrustError</string>
                             <string>SubversionLoginError</string>
                             <string>_getattr_</string>
+                            <string>context</string>
+                            <string>svn_path</string>
                             <string>_getitem_</string>
-                            <string>context</string>
                             <string>log_list</string>
                             <string>error</string>
                             <string>error1</string>

Modified: erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_ls.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_ls.xml?rev=6545&r1=6544&r2=6545&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_ls.xml (original)
+++ erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_ls.xml Tue Apr 11 11:33:23 2006
@@ -67,6 +67,12 @@
         <item>
             <key> <string>_body</string> </key>
             <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
 try:\n
   infos_list = context.getPortalObject()["portal_subversion"].ls(file)\n
@@ -123,8 +129,9 @@
                             <string>SubversionSSLTrustError</string>
                             <string>SubversionLoginError</string>
                             <string>_getattr_</string>
+                            <string>context</string>
+                            <string>svn_path</string>
                             <string>_getitem_</string>
-                            <string>context</string>
                             <string>infos_list</string>
                             <string>error</string>
                             <string>error1</string>

Modified: erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_revert.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_revert.xml?rev=6545&r1=6544&r2=6545&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_revert.xml (original)
+++ erp5/trunk/bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_svn/svn_revert.xml Tue Apr 11 11:33:23 2006
@@ -67,8 +67,15 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>to_revert = files.split(\',\')\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_revert != \'none\' :\n
+  for relative_path in to_revert:\n
+    relative_path = svn_path + relative_path\n
   context.getPortalObject()["portal_subversion"].revert(path=to_revert)\n
 \n
 context.REQUEST.set(\'portal_status_message\', \'Changes reverted successfully!\')\n
@@ -116,8 +123,11 @@
                             <string>files</string>
                             <string>_getattr_</string>
                             <string>to_revert</string>
+                            <string>context</string>
+                            <string>svn_path</string>
                             <string>_getitem_</string>
-                            <string>context</string>
+                            <string>_getiter_</string>
+                            <string>relative_path</string>
                           </tuple>
                         </value>
                     </item>




More information about the Erp5-report mailing list